Examples of EntityType


Examples of com.caucho.amber.type.EntityType

        EntityItem value = valueRef.get();

        if (value == null)
          continue;

        EntityType entityRoot = value.getEntityHome().getEntityType();
        Object entityKey = key.getKey();

        for (int i = 0; i < size; i++) {
          if (completions.get(i).complete(entityRoot, entityKey, value)) {
            // XXX: delete
View Full Code Here

Examples of com.caucho.amber.type.EntityType

    return _dependencies;
  }

  protected boolean isEntityParent()
  {
    EntityType parentType = getEntityType().getParentType();

      // jpa/0gg0
    return ((parentType != null) && parentType.isEntity());
  }
View Full Code Here

Examples of com.caucho.amber.type.EntityType

  @Override
  public final void generate(JavaWriter out)
    throws IOException
  {
    try {
      EntityType parentType = getEntityType().getParentType();

      generateHeader(out, isEntityParent());

      generateInit(out);
View Full Code Here

Examples of com.caucho.amber.type.EntityType

    int index = entityType.getLoadGroupIndex();

    boolean hasLoad = (entityType.getFields().size() > 0);

    EntityType parentType = entityType.getParentType();
    if (parentType == null || ! parentType.isEntity()) {
      index = 0;
      hasLoad = true;
    }

    generateRetrieveEager(out, parentType);
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.InfiniteEnums.EntityType

public class DimensionUtility {

  public static EntityPojo.Dimension getDimensionByType(String type)
  {
    EntityType et = null;
    try {
      et = EntityType.valueOf(type.toLowerCase());
    }
    catch (Exception e) {
      return Dimension.What;
View Full Code Here

Examples of com.mysema.query.codegen.EntityType

        NoSuchMethodException {
        // super classes
        Iterator<?> superClassMappings = configuration.getMappedSuperclassMappings();
        while (superClassMappings.hasNext()) {
            MappedSuperclass msc = (MappedSuperclass)superClassMappings.next();
            EntityType entityType = createSuperType(msc.getMappedClass());
            if (msc.getDeclaredIdentifierProperty() != null) {
                handleProperty(entityType, msc.getMappedClass(), msc.getDeclaredIdentifierProperty());
            }
            Iterator<?> properties = msc.getDeclaredPropertyIterator();
            while (properties.hasNext()) {
                handleProperty(entityType, msc.getMappedClass(), (org.hibernate.mapping.Property) properties.next());
            }
        }

        // entity classes
        Iterator<?> classMappings = configuration.getClassMappings();
        while (classMappings.hasNext()) {
            PersistentClass pc = (PersistentClass)classMappings.next();
            EntityType entityType = createEntityType(pc.getMappedClass());
            if (pc.getDeclaredIdentifierProperty() != null) {
                handleProperty(entityType, pc.getMappedClass(), pc.getDeclaredIdentifierProperty());
            } else if (!pc.isInherited() && pc.hasIdentifierProperty()) {
                logger.info(entityType.toString() + pc.getIdentifierProperty());
                handleProperty(entityType, pc.getMappedClass(), pc.getIdentifierProperty());
            } else if (pc.getIdentifier() != null) {
                KeyValue identifier = pc.getIdentifier();
                if (identifier instanceof Component) {
                    Component component = (Component)identifier;
                    Iterator<?> properties = component.getPropertyIterator();
                    if (component.isEmbedded()) {
                        while (properties.hasNext()) {
                            handleProperty(entityType, pc.getMappedClass(), (org.hibernate.mapping.Property) properties.next());
                        }
                    } else {
                        String name = component.getNodeName();
                        Class<?> clazz = component.getType().getReturnedClass();
                        Type propertyType = getType(pc.getMappedClass(), clazz, name);
                        AnnotatedElement annotated = getAnnotatedElement(pc.getMappedClass(), name);
                        Property property = createProperty(entityType, name, propertyType, annotated);
                        entityType.addProperty(property);
                        // handle component properties
                        EntityType embeddedType = createEmbeddableType(propertyType);
                        while (properties.hasNext()) {
                            handleProperty(embeddedType, clazz, (org.hibernate.mapping.Property) properties.next());
                        }
                    }
                }
View Full Code Here

Examples of com.sk89q.worldedit.entity.metadata.EntityType

                boolean killAnimals = (flags & Flags.ANIMALS) != 0;
                boolean killGolems = (flags & Flags.GOLEMS) != 0;
                boolean killAmbient = (flags & Flags.AMBIENT) != 0;
                boolean killTagged = (flags & Flags.TAGGED) != 0;

                EntityType type = entity.getFacet(EntityType.class);

                if (type == null) {
                    return false;
                }

                if (type.isPlayerDerived()) {
                    return false;
                }

                if (!type.isLiving()) {
                    return false;
                }

                if (!killAnimals && type.isAnimal()) {
                    return false;
                }

                if (!killPets && type.isTamed()) {
                    return false;
                }

                if (!killGolems && type.isGolem()) {
                    return false;
                }

                if (!killNPCs && type.isNPC()) {
                    return false;
                }

                if (!killAmbient && type.isAmbient()) {
                    return false;
                }

                if (!killTagged && type.isTagged()) {
                    return false;
                }

                entity.remove();
                return true;
View Full Code Here

Examples of cross.reputation.model.EntityType

    return null;
  }
 
  public EntityType getEntityType(Model model,
      Resource resource) throws Exception {
    EntityType entityType = (EntityType) getResourceFromCache(
        resource, EntityType.class);
    if(entityType != null) {     
      return entityType;
    }   
    entityType = new EntityType();
    addResourceInstanceToCache(resource, entityType);
    // type //
    Property type = ResourceFactory.createProperty(riNamespace + "type");
    StmtIterator stmtI1 = model.listStatements(resource,
        type, (RDFNode)null);
    while(stmtI1.hasNext()) {
      Statement statement = stmtI1.nextStatement();
      // validate type property //
      if(!statement.getObject().isLiteral()) {         
        if(!ModelException.throwException(ModelException.ENTITYTYPE,
            "type property of EntityType resource:"+
            resource.getURI()+" is not a literal")) {
          return null;
        }
      } else {
        entityType.setType(statement.getObject().asLiteral().getString());
      }
    }
    return entityType;
  }
View Full Code Here

Examples of javax.persistence.metamodel.EntityType

          "Applying named entity graph [name=%s, entity-name=%s, jpa-entity-name=%s",
          definition.getRegisteredName(),
          definition.getEntityName(),
          definition.getJpaEntityName()
      );
      final EntityType entityType = metamodel.getEntityTypeByName( definition.getEntityName() );
      if ( entityType == null ) {
        throw new IllegalArgumentException(
            "Attempted to register named entity graph [" + definition.getRegisteredName()
                + "] for unknown entity ["+ definition.getEntityName() + "]"

        );
      }
      final EntityGraphImpl entityGraph = new EntityGraphImpl(
          definition.getRegisteredName(),
          entityType,
          this
      );

      final NamedEntityGraph namedEntityGraph = definition.getAnnotation();

      if ( namedEntityGraph.includeAllAttributes() ) {
        for ( Object attributeObject : entityType.getAttributes() ) {
          entityGraph.addAttributeNodes( (Attribute) attributeObject );
        }
      }

      if ( namedEntityGraph.attributeNodes() != null ) {
View Full Code Here

Examples of org.apache.falcon.entity.v0.EntityType

        for (int index = 2; index < args.length; index++) {
            entity = args[index];
            String[] deps = client.getDependency(type, entity).split("\n");
            for (String line : deps) {
                String[] fields = line.replace("(", "").replace(")", "").split(" ");
                EntityType eType = EntityType.valueOf(fields[0].toUpperCase());
                if (ConfigurationStore.get().get(eType, fields[1]) != null) {
                    continue;
                }
                String xml = client.getDefinition(eType.name().toLowerCase(), fields[1]);
                System.out.println(xml);
                store(eType, xml);
            }
            String xml = client.getDefinition(type.toLowerCase(), entity);
            System.out.println(xml);
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.