Examples of CustomObject


Examples of ch.inftec.ju.db.data.entity.CustomObject

  @Test
  public void dbConnection() {
    Assert.assertEquals("Derby Test DB", this.connectionInfo.getName());
    Assert.assertNull(this.connectionInfo.getSchema());
   
    CustomObject o = new CustomObject();
    this.entityManager.persist(o);
    Assert.assertNotNull(o.getId());
  }
View Full Code Here

Examples of com.force.sdk.jpa.annotation.CustomObject

    }
   
    @SuppressWarnings("rawtypes")
    public void registerTable(Class<?> entityClass) {
        TableImpl tableImpl;
        CustomObject customObjectAnnotation = entityClass.getAnnotation(CustomObject.class);
        if (customObjectAnnotation != null && customObjectAnnotation.virtualSchema()) {
            tableImpl = MockPersistenceUtils.constructVirtualTableImpl(entityClass);
        } else {
            tableImpl = MockPersistenceUtils.constructTableImpl(entityClass);
        }
       
View Full Code Here

Examples of com.force.sdk.jpa.annotation.CustomObject

                           new Class[] {String.class, TableName.class, List.class, Map.class, ColumnImpl.class},
                                        namespace, tableName, columnList, forceApiColumns, externalId);
    }
   
    public static TableImpl constructVirtualTableImpl(Class<?> entityClass) {
        CustomObject customObjectAnnotation = entityClass.getAnnotation(CustomObject.class);
        if (customObjectAnnotation == null || !customObjectAnnotation.virtualSchema()) {
            throw new IllegalArgumentException("Trying to construct virtual schema for the class " + entityClass.getName()
                    + " but this class is not annotated as virtual schema.");
        }
       
        TableName tableName = newInstance(TableName.class, new Class[] {String.class, String.class, Boolean.TYPE},
View Full Code Here

Examples of com.kdubb.retrofitexamples.domain.CustomObject

import com.kdubb.retrofitexamples.domain.CustomObject;

@Service
public class CustomFactory {
  public CustomObject buildCustomObject() {
    CustomObject customObject = new CustomObject();
    customObject.setA("a string thing");
    customObject.setB(123456);
    customObject.setC(true);
    customObject.setD(1.23456);
   
    Collection<String> strings = new ArrayList<String>();
   
    for(int i = 1; i < 4; i++)
      strings.add("string #" + i);
     
    customObject.setE(strings);
   
    return customObject;
  }
View Full Code Here

Examples of com.kdubb.retrofitexamples.domain.CustomObject

   
    try {
      ObjectMapper mapper = new ObjectMapper();
     
      // We want to take a peek to see if all the fields are set correctly
      CustomObject custom = simpleApi.simpleCustom();
      System.out.println("simpleApi.simpleCustom()=<<" + custom + ">>");
      System.out.println("simpleApi.simpleCustom() as JSON=<<" + mapper.writeValueAsString(custom) + ">>");
     
      CustomChild child = simpleApi.simpleChild();
      System.out.println("simpleApi.simpleChild()=<<" + child + ">>");
View Full Code Here

Examples of com.khorn.terraincontrol.customobjects.CustomObject

        // Read from BiomeObjects setting
        List<String> customObjectStrings = readSettings(BiomeStandardValues.BIOME_OBJECTS);
        for (String customObjectString : customObjectStrings)
        {
            CustomObject object = worldConfig.worldObjects.parseCustomObject(customObjectString);
            if (object != null && !(object instanceof UseBiome))
            {
                biomeObjects.add(object);
                biomeObjectStrings.add(customObjectString);
            }
View Full Code Here

Examples of com.khorn.terraincontrol.customobjects.CustomObject

        }
        objects = new ArrayList<CustomObject>();
        objectNames = new ArrayList<String>();
        for (String arg : args)
        {
            CustomObject object = getHolder().worldConfig.worldObjects.parseCustomObject(arg);
            if (object == null || !object.canSpawnAsObject())
            {
                throw new InvalidConfigException("No custom object found with the name " + arg);
            }
            objects.add(object);
            objectNames.add(arg);
View Full Code Here

Examples of com.khorn.terraincontrol.customobjects.CustomObject

        if (args.isEmpty())
        {
            me.sendMessage(ERROR_COLOR + "You must enter the name of the BO2.");
            return true;
        }
        CustomObject spawnObject = null;

        if (bukkitWorld != null)
            spawnObject = bukkitWorld.getConfigs().getCustomObjects().parseCustomObject(args.get(0));

        if (spawnObject == null)
        {
            sender.sendMessage(ERROR_COLOR + "Object not found, use '/tc list' to list the available ones.");
            return true;
        }

        Block block = this.getWatchedBlock(me, true);
        if (block == null)
            return true;
       
        if (spawnObject.spawnForced(bukkitWorld, random, Rotation.NORTH, block.getX(), block.getY(), block.getZ()))
        {
            me.sendMessage(BaseCommand.MESSAGE_COLOR + spawnObject.getName() + " was spawned.");
        } else
        {
            me.sendMessage(BaseCommand.ERROR_COLOR + "Object can't be spawned over there.");
        }
View Full Code Here

Examples of com.khorn.terraincontrol.customobjects.CustomObject

        treeNames = new ArrayList<String>();
        treeChances = new ArrayList<Integer>();

        for (int i = 1; i < args.size() - 1; i += 2)
        {
            CustomObject object = getHolder().worldConfig.worldObjects.parseCustomObject(args.get(i));
            if (object == null)
            {
                throw new InvalidConfigException("Custom object " + args.get(i) + " not found!");
            }
            if (!object.canSpawnAsTree())
            {
                throw new InvalidConfigException("Custom object " + args.get(i) + " is not a tree!");
            }
            trees.add(object);
            treeNames.add(args.get(i));
View Full Code Here

Examples of com.khorn.terraincontrol.customobjects.CustomObject

        objects = new ArrayList<StructuredCustomObject>();
        objectNames = new ArrayList<String>();
        objectChances = new ArrayList<Double>();
        for (int i = 0; i < args.size() - 1; i += 2)
        {
            CustomObject object = getHolder().worldConfig.worldObjects.parseCustomObject(args.get(i));
            if (object == null || !object.canSpawnAsObject())
            {
                throw new InvalidConfigException("No custom object found with the name " + args.get(i));
            }
            if (!(object instanceof StructuredCustomObject) || ((StructuredCustomObject) object).getBranches(Rotation.NORTH).length == 0)
            {
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.