java.lang.Object
com.peterphi.std.guice.hibernate.webquery.impl.QEntity

public class QEntity extends Object
  • Constructor Details

    • QEntity

      public QEntity(Class<?> clazz)
  • Method Details

    • getEntityClass

      public Class<?> getEntityClass()
    • getMetamodelEntity

      public javax.persistence.metamodel.EntityType<?> getMetamodelEntity()
    • parseEmbeddable

      public void parseEmbeddable(QEntityFactory entityFactory, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory, String prefix, javax.persistence.metamodel.EmbeddableType<?> type)
      Parse an @Embeddable
      Parameters:
      entityFactory -
      sessionFactory -
      prefix -
      type -
    • isEagerFetch

      protected boolean isEagerFetch(javax.persistence.metamodel.Attribute<?,?> attribute)
    • getEagerFetch

      public Set<String> getEagerFetch()
    • getEagerFetch

      protected void getEagerFetch(Set<QEntity> visited, Stack<String> path, Set<String> populate)
    • getName

      public String getName()
    • getDiscriminatorValue

      public String getDiscriminatorValue()
    • getPropertyNames

      public Set<String> getPropertyNames()
    • getRelationNames

      public Set<String> getRelationNames()
    • hasProperty

      public boolean hasProperty(String name)
    • hasRelation

      public boolean hasRelation(String name)
    • hasNonEntityRelation

      public boolean hasNonEntityRelation(String name)
    • isNonEntityRelationCollection

      public boolean isNonEntityRelationCollection(String name)
    • getIdPropertyName

      public String getIdPropertyName()
    • newInstanceWithId

      public Object newInstanceWithId(Object id)
      Create a new instance of this entity, setting only the ID field
      Parameters:
      id -
      Returns:
    • getProperty

      public QProperty getProperty(String name)
    • getRelation

      public QRelation getRelation(String name)
    • getSubEntities

      public List<QEntity> getSubEntities()
    • encode

      public WQEntitySchema encode()
    • isEntityClassAbstract

      public boolean isEntityClassAbstract()
      Return true if the underlying entity class is abstract
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSubEntity

      public QEntity getSubEntity(String discriminator)
    • getCommonSubclass

      public QEntity getCommonSubclass(List<String> discriminators)
    • getDefaultGraph

      public org.hibernate.graph.RootGraph getDefaultGraph(org.hibernate.Session session)
      Build or return the default Entity Graph that represents defaultExpand
      Parameters:
      session -
      Returns: