Package com.draagon.meta

Examples of com.draagon.meta.MetaClass


    int i = ref.indexOf( OBJECTREF_SEP, OBJECTREF_PREFIX.length() + 1 );
    if ( i < 0 )
      throw new IllegalArgumentException( "Invalid object reference [" + ref + "]" );

    MetaClass mc = MetaClass.forName( ref.substring( OBJECTREF_PREFIX.length(), i ));

    i += OBJECTREF_SEP.length();
    ArrayList<String> al = new ArrayList<String>();

    while( true )
View Full Code Here


    return false;
  }

  public static void main( String [] args ) throws ExpressionParseError
  {
    MetaClass mc = new BeanMetaClass();
    mc.setName( "test" );
    MetaField a = new LongField();
    a.setName( "id" );
    MetaField b = new StringField();
    b.setName( "name" );
    MetaField c = new IntegerField();
    c.setName( "value" );
    MetaField d = new DateField();
    d.setName( "time" );
    mc.addMetaField( a );
    mc.addMetaField( b );
    mc.addMetaField( c );
    mc.addMetaField( d );

    Expression exp = ExpressionParser.getInstance().parse( mc, "( time > = '10/12/2006 14:55' and ( ( id = 5 or name = 'test me!' ) and value <> 20))" );
    System.out.println( "EXPRESSION: " + exp );
  }
View Full Code Here

TOP

Related Classes of com.draagon.meta.MetaClass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.