Examples of Subtype


Examples of com.avaje.tests.compositekeys.db.SubType

    Ebean.createUpdate(Type.class, "delete from Type").execute();
    Ebean.createUpdate(SubType.class, "delete from SubType").execute();

        Transaction tx = getServer().beginTransaction();

    SubType subType = new SubType();
    SubTypeKey subTypeKey = new SubTypeKey();
    subTypeKey.setSubTypeId(1);
    subType.setKey(subTypeKey);
    subType.setDescription("ANY SUBTYPE");
    getServer().save(subType);

        Type type = new Type();
        TypeKey typeKey = new TypeKey();
        typeKey.setCustomer(1);
View Full Code Here

Examples of com.avaje.tests.compositekeys.db.SubType

    Type type = item.getEType();
    assertNotNull(type);
    assertNotNull(type.getDescription());

    SubType subType = type.getSubType();
    assertNotNull(subType);
    assertNotNull(subType.getDescription());
  }
View Full Code Here

Examples of org.fusesource.restygwt.rebind.JsonEncoderDecoderClassCreator.Subtype

            }

            for (Map.Entry<String, Class<?>> entry : restyResolver.getIdClassMap().entrySet()) {
            JClassType entryType = BaseSourceCreator.find(entry.getValue(), logger, context);
            if (!isLeaf || classType.equals(entryType))
                possibleTypes.add(new Subtype(entry.getKey(), entryType));
            }
            if (isLeaf && possibleTypes.size() == 0)
            {
                logger.log(BaseSourceCreator.ERROR, "Could not find entry in " + restyResolver.getClass().getName() + " for type: " + classType);
                throw new UnableToCompleteException();
            }
        } else if (types != null) {
            for (JsonSubTypes.Type type : types) {
                if (type.name() != null && !type.name().isEmpty()) {
                    JClassType typeClass = BaseSourceCreator.find(type.value(), logger, context);
                    if (!isLeaf || classType.equals(typeClass))
                    possibleTypes.add(new Subtype(type.name(), typeClass));
                } else {
                    JsonTypeName nameAnnotation = type.value().getAnnotation(JsonTypeName.class);
                    if (nameAnnotation == null || nameAnnotation.value() == null || nameAnnotation.value().isEmpty())
                    {
                        logger.log(BaseSourceCreator.ERROR, "Cannot find @JsonTypeName annotation for type: " + type.value());
                        throw new UnableToCompleteException();
                    }
                    JClassType typeClass = BaseSourceCreator.find(type.value(), logger, context);
                    if (!isLeaf || classType.equals(typeClass))
                        possibleTypes.add(new Subtype(nameAnnotation.value(), typeClass));
                }

            }
            if (isLeaf && possibleTypes.size() == 0)
            {
View Full Code Here

Examples of org.fusesource.restygwt.rebind.JsonEncoderDecoderClassCreator.Subtype

                    resolvedSubtypes.add(typeClass);
            }
        }

        for (JClassType typeClass : resolvedSubtypes)
            possibleTypes.add(new Subtype(id == Id.CLASS ? typeClass.getQualifiedSourceName() : "." + typeClass.getSimpleSourceName(), typeClass));

        return possibleTypes;
    }
View Full Code Here

Examples of org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.Instructions.SubType

  public CodeBlock TYPEOF() {
    return add(new TypeOf(this));
  }
 
  public CodeBlock SUBTYPE() {
    return add(new SubType(this));
  }
View Full Code Here

Examples of org.solarus.editor.entities.NPC.Subtype

        });

        subtypeField.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ev) {

                Subtype subtype = (Subtype) subtypeField.getValue();
                if (subtype == Subtype.USUAL_NPC) {
                  // Sprite is mandatory.
                  withSpriteField.setEnabled(false);
                  withSpriteField.setSelected(true);
                  spriteField.setEnabled(true);
View Full Code Here

Examples of org.solarus.editor.entities.NPC.Subtype

        super.update(); // update the common fields

        NPC npc = (NPC) entity;
        String sprite = npc.getStringProperty("sprite");
        String behavior = npc.getStringProperty("behavior");
        Subtype subtype = (Subtype) npc.getSubtype();

        boolean hasSprite = sprite != null;
        boolean mustHaveSprite = subtype == Subtype.USUAL_NPC;

        withSpriteField.setSelected(hasSprite || mustHaveSprite);
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.