Examples of ClassInfo


Examples of org.mmisw.orrclient.gwt.client.rpc.ClassInfo

    termTable.setReadOnly(readOnly);
  }
 
  private String getClassNameFromClassData() {
    String classUri = classData.getClassUri();
    ClassInfo classInfo = classData.getClassInfo();
    String className;
    if ( classInfo != null ) {
      className = classInfo.getLocalName();
    }
    else {
      // should not happen; extract simple name for URI? For now, just use the whole URI:
      className = classUri;
    }
View Full Code Here

Examples of org.tod.meta.ClassInfo

           
            // If we are currently on a line marked as a return (such as a 'return now' line),
            // then we must perform step over TWICE, to get around the odd way in which TOD
            // instruments the bytecode.
            if(this.behavior != null && this.lineNumber >= 0) {
                ClassInfo classInfo = this.getTODSession().getClassInformationProvider().getClassInfo(behavior.getDeclaringType());
                SourceInfo sourceInfo = classInfo.getSourceInfo();
               
                if (sourceInfo.isActionEnd(this.lineNumber) || sourceInfo.isReturn(this.lineNumber)) {
                    // Step over twice.
                    if (this.behavior.getName().equals("Main") || this.behavior.getName().equals("main")) {
                        return false;
View Full Code Here

Examples of siena.ClassInfo

    // TODO define the search strings
    if(keywords != null){
      if(searchFields != null && searchFields.size() != 0){
        q.search(keywords, (String[])searchFields.toArray());
      }else{
        ClassInfo ci = ClassInfo.getClassInfo(clazz);
        String[] strs = new String[ci.allFields.size()];
        int i=0;
        for(Field f : ClassInfo.getClassInfo(clazz).allFields){
          strs[i++] = f.getName();
        }
View Full Code Here

Examples of siena.ClassInfo

    // TODO define the search strings
    if(keywords != null){
      if(searchFields != null && searchFields.size() != 0){
        q.search(keywords, (String[])searchFields.toArray());
      }else{
        ClassInfo ci = ClassInfo.getClassInfo(clazz);
        String[] strs = new String[ci.allFields.size()];
        int i=0;
        for(Field f : ClassInfo.getClassInfo(clazz).allFields){
          strs[i++] = f.getName();
        }
View Full Code Here

Examples of siena.ClassInfo

              while (rs.next()) {
                  String name = rs.getString("TABLE_NAME");
                  names.add(name);
              }*/
              for (Class<?> c : SienaModelUtils.getSienaClasses()) {
                  ClassInfo ci = ClassInfo.getClassInfo(c);
                 
                  names.add(ci.tableName);
              }
             
              disableForeignKeyConstraints();
View Full Code Here

Examples of siena.ClassInfo

    return syncPm;
  }

  public SienaFuture<Void> insert(final Object obj) {
    final Class<?> clazz = obj.getClass();
    final ClassInfo info = ClassInfo.getClassInfo(clazz);
    final Field idField = info.getIdField();
   
    Entity entity = GaeMappingUtils.createEntityInstance(idField, info, obj);
    GaeMappingUtils.fillEntity(obj, entity);
    Future<Key> future = ds.put(entity);
   
View Full Code Here

Examples of siena.ClassInfo

  public SienaFuture<Integer> insert(final Object... objects) {
    List<Entity> entities = new ArrayList<Entity>(objects.length);
    for(int i=0; i<objects.length;i++){
      Class<?> clazz = objects[i].getClass();
      ClassInfo info = ClassInfo.getClassInfo(clazz);
      Field idField = info.getIdField();
      Entity entity = GaeMappingUtils.createEntityInstance(idField, info, objects[i]);
      GaeMappingUtils.fillEntity(objects[i], entity);
      entities.add(entity);
    }
       
    Future<List<Key>> future = ds.put(entities);
   
    Future<Integer> wrapped = new SienaFutureWrapper<List<Key>, Integer>(future) {
             @Override
             protected Integer wrap(List<Key> generatedKeys) throws Exception
             {
               int i=0;
               for(Object obj:objects){
                 Class<?> clazz = obj.getClass();
                 ClassInfo info = ClassInfo.getClassInfo(clazz);
                 Field idField = info.getIdField();
                 GaeMappingUtils.setIdFromKey(idField, obj, generatedKeys.get(i++));
               }
               return generatedKeys.size();
             }
    };
View Full Code Here

Examples of siena.ClassInfo

  public SienaFuture<Integer> insert(final Iterable<?> objects) {
    List<Entity> entities = new ArrayList<Entity>();
    for(Object obj:objects){
      Class<?> clazz = obj.getClass();
      ClassInfo info = ClassInfo.getClassInfo(clazz);
      Field idField = info.getIdField();
      Entity entity = GaeMappingUtils.createEntityInstance(idField, info, obj);
      GaeMappingUtils.fillEntity(obj, entity);
      entities.add(entity);
    }   
   
    Future<List<Key>> future = ds.put(entities);
   
    Future<Integer> wrapped = new SienaFutureWrapper<List<Key>, Integer>(future) {
             @Override
             protected Integer wrap(List<Key> generatedKeys) throws Exception
             {
               int i=0;
               for(Object obj:objects){
                 Class<?> clazz = obj.getClass();
                 ClassInfo info = ClassInfo.getClassInfo(clazz);
                 Field idField = info.getIdField();
                 GaeMappingUtils.setIdFromKey(idField, obj, generatedKeys.get(i++));
               }
               return generatedKeys.size();
             }
    };
View Full Code Here

Examples of siena.ClassInfo

  public SienaFuture<Integer> update(Object... objects) {
    //throw new NotImplementedException("update not implemented for GAE yet");
    List<Entity> entities = new ArrayList<Entity>();
    for(Object obj:objects){
      Class<?> clazz = obj.getClass();
      ClassInfo info = ClassInfo.getClassInfo(clazz);
      Entity entity = GaeMappingUtils.createEntityInstanceForUpdate(info, obj);
      GaeMappingUtils.fillEntity(obj, entity);
      entities.add(entity);
    }
       
View Full Code Here

Examples of siena.ClassInfo

  public <T> SienaFuture<Integer> update(Iterable<T> objects) {
    //throw new NotImplementedException("update not implemented for GAE yet");
    List<Entity> entities = new ArrayList<Entity>();
    for(Object obj:objects){
      Class<?> clazz = obj.getClass();
      ClassInfo info = ClassInfo.getClassInfo(clazz);
      Entity entity = GaeMappingUtils.createEntityInstanceForUpdate(info, obj);
      GaeMappingUtils.fillEntity(obj, entity);
      entities.add(entity);
    }
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.