Examples of ClassInfo


Examples of siena.ClassInfo

  }

  public SienaFuture<Void> save(final Object obj) {
    Class<?> clazz = obj.getClass();
    ClassInfo info = ClassInfo.getClassInfo(clazz);
    final Field idField = info.getIdField();
   
    final Entity entity;
    final Object idVal = Util.readField(obj, idField);
    // id with null value means insert
    if(idVal == null){
View Full Code Here

Examples of siena.ClassInfo

  public SienaFuture<Integer> save(final Object... 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;
      Object idVal = Util.readField(obj, idField);
      // id with null value means insert
      if(idVal == null){
        entity = GaeMappingUtils.createEntityInstance(idField, info, obj);
      }
      // id with not null value means update
      else{
        entity = GaeMappingUtils.createEntityInstanceForUpdate(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> keys) throws Exception
            {
              int i=0;
            for(Object obj:objects){
              Class<?> clazz = obj.getClass();
              ClassInfo info = ClassInfo.getClassInfo(clazz);
              Field idField = info.getIdField();
              Object idVal = Util.readField(obj, idField);
              if(idVal == null){
                GaeMappingUtils.setIdFromKey(idField, obj, keys.get(i++));
              }
            }
View Full Code Here

Examples of tv.porst.swfretools.parser.structures.ClassInfo

      if (i >= data.getInstances().size()) {
        errors.add(String.format("Class at offset %08X could not be resolved as its instance index is out of bounds"));
        continue;
      }

      final ClassInfo classInfo = data.getClasses().get(i);
      final InstanceInfo instanceInfo = data.getInstances().get(i);

      classes.add(resolveClass(data, classInfo, instanceInfo, methodMapping, errors));
    }
View Full Code Here

Examples of uk.co.jemos.podam.api.ClassInfo

    Set<String> pojoDeclaredFields = new HashSet<String>();

    Set<Method> pojoSetters = new HashSet<Method>();

    ClassInfo expectedClassInfo = new ClassInfo(EmptyTestPojo.class,
        pojoDeclaredFields, pojoSetters);

    ClassInfo actualClassInfo = PodamUtils
        .getClassInfo(EmptyTestPojo.class);

    Assert.assertEquals(
        "The expected and actual ClassInfo objects are not the same",
        expectedClassInfo, actualClassInfo);
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.