Top Description Inners Fields Methods
org.hibernate.persister.entity

public Interface Queryable

extends Loadable, PropertyMapping, Joinable
Known Direct Implementers
org.hibernate.persister.entity.AbstractEntityPersister
Imports
org.hibernate.sql.SelectFragment

Extends the generic EntityPersister contract to add operations required by the Hibernate Query Language
Author
Gavin King

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Inherited from org.hibernate.persister.entity.Loadable:
ROWID_ALIAS

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The alias used for "filter conditions" within the where clause.
generateFilterConditionAlias
(String
The root alias
rootAlias
)

The alias used for any filter conditions (mapped where-fragments or enabled-filters).

public String[]

Returns:

The ordered array of table names.
getConstraintOrderedTableNameClosure
()

Get the names of all tables used in the hierarchy (up and down) ordered such that deletes in the given order would not cause constraint violations.

public String[][]
getContraintOrderedTableKeyColumnClosure()

For each table specified in getConstraintOrderedTableNameClosure(), get the columns that define the key between the various hierarchy classes.

public String
getDiscriminatorSQLValue()

Get the discriminator value for this particular concrete subclass, as a string that may be embedded in a select statement

public String[]
getIdentifierColumnNames()

Redeclares org.hibernate.persister.entity.Loadable.getIdentifierColumnNames.

Get the names of columns used to persist the identifier
public String
getMappedSuperclass()

Get the class that this class is mapped as a subclass of - not necessarily the direct superclass

public Queryable.Declarer

Returns:

The property declarer
getSubclassPropertyDeclarer
(String
The property name.
propertyPath
)

Determine whether the given property is declared by our mapped class, our super class, or one of our subclasses...

public String[][]
public int

Returns:

The number of the table to which the property is mapped.
getSubclassPropertyTableNumber
(String
The name of the property.
propertyPath
)

Given a property name, determine the number of the table which contains the column to which this property is mapped.

public String
getSubclassTableName(int
The index into the internal array.
number
)

Get the name of the table with the given index from the internal array.

public DiscriminatorMetadata

Returns:

The entity discriminator metadata
getTypeDiscriminatorMetadata
()

Retrieve the information needed to properly deal with this entity's discriminator in a query.

public String
identifierSelectFragment(String name, String suffix)

Given a query alias and an identifying suffix, render the identifier select fragment.

public boolean
isAbstract()

Redeclares org.hibernate.persister.entity.Loadable.isAbstract.

Is this an abstract class?
public boolean
isExplicitPolymorphism()

Is this class explicit polymorphism only?

public boolean

Returns:

True if the inheritance hierarchy is spread across multiple tables; false otherwise.
isMultiTable
()

Is the inheritance hierarchy described by this persister contained across multiple tables?

public boolean
isVersionPropertyInsertable()

Is the version property included in insert statements?

public String
propertySelectFragment(String alias, String suffix, boolean allProperties)

Given a query alias and an identifying suffix, render the property select fragment.

public SelectFragment
propertySelectFragmentFragment(String alias, String suffix, boolean allProperties)

Inherited from org.hibernate.persister.entity.Joinable:
consumesCollectionAliasconsumesEntityAliasfilterFragmentfilterFragmentfromJoinFragmentfromJoinFragmentfromJoinFragmentgetKeyColumnNamesgetNamegetTableNameisCollectiononeToManyFilterFragmentoneToManyFilterFragmentselectFragmentwhereJoinFragmentwhereJoinFragment
Inherited from org.hibernate.persister.entity.Loadable:
getDiscriminatorAliasgetDiscriminatorColumnNamegetDiscriminatorTypegetDiscriminatorValuegetIdentifierAliasesgetPropertyAliasesgetPropertyColumnNamesgetSubclassForDiscriminatorValuegetTableAliasForColumnhasRowIdhasSubclasseshydratehydrateregisterAffectingFetchProfile
Inherited from org.hibernate.persister.entity.PropertyMapping:
getTypetoColumnstoColumnstoType

Method Detail

generateFilterConditionAliasback to summary
public String generateFilterConditionAlias(String rootAlias)

The alias used for any filter conditions (mapped where-fragments or enabled-filters).

This may or may not be different from the root alias depending upon the inheritance mapping strategy.
Parameters
rootAlias:String

The root alias

Returns:String

The alias used for "filter conditions" within the where clause.

getConstraintOrderedTableNameClosureback to summary
public String[] getConstraintOrderedTableNameClosure()

Get the names of all tables used in the hierarchy (up and down) ordered such that deletes in the given order would not cause constraint violations.

Returns:String[]

The ordered array of table names.

getContraintOrderedTableKeyColumnClosureback to summary
public String[][] getContraintOrderedTableKeyColumnClosure()

For each table specified in getConstraintOrderedTableNameClosure(), get the columns that define the key between the various hierarchy classes.

The first dimension here corresponds to the table indexes returned in getConstraintOrderedTableNameClosure().

The second dimension should have the same length across all the elements in the first dimension. If not, that would be a problem ;)

getDiscriminatorSQLValueback to summary
public String getDiscriminatorSQLValue()

Get the discriminator value for this particular concrete subclass, as a string that may be embedded in a select statement

getIdentifierColumnNamesback to summary
public String[] getIdentifierColumnNames()

Redeclares org.hibernate.persister.entity.Loadable.getIdentifierColumnNames.

Get the names of columns used to persist the identifier

getMappedSuperclassback to summary
public String getMappedSuperclass()

Get the class that this class is mapped as a subclass of - not necessarily the direct superclass

getSubclassPropertyDeclarerback to summary
public Queryable.Declarer getSubclassPropertyDeclarer(String propertyPath)

Determine whether the given property is declared by our mapped class, our super class, or one of our subclasses...

Note

the method is called 'subclass property...' simply for consistency sake (e.g. getSubclassPropertyTableNumber

Parameters
propertyPath:String

The property name.

Returns:Queryable.Declarer

The property declarer

getSubclassPropertyFormulaTemplateClosureback to summary
public String[][] getSubclassPropertyFormulaTemplateClosure()
getSubclassPropertyTableNumberback to summary
public int getSubclassPropertyTableNumber(String propertyPath)

Given a property name, determine the number of the table which contains the column to which this property is mapped.

Note that this is not relative to the results from getConstraintOrderedTableNameClosure(). It is relative to the subclass table name closure maintained internal to the persister (yick!). It is also relative to the indexing used to resolve getSubclassTableName...

Parameters
propertyPath:String

The name of the property.

Returns:int

The number of the table to which the property is mapped.

getSubclassTableNameback to summary
public String getSubclassTableName(int number)

Get the name of the table with the given index from the internal array.

Parameters
number:int

The index into the internal array.

getTypeDiscriminatorMetadataback to summary
public DiscriminatorMetadata getTypeDiscriminatorMetadata()

Retrieve the information needed to properly deal with this entity's discriminator in a query.

Returns:DiscriminatorMetadata

The entity discriminator metadata

identifierSelectFragmentback to summary
public String identifierSelectFragment(String name, String suffix)

Given a query alias and an identifying suffix, render the identifier select fragment.

isAbstractback to summary
public boolean isAbstract()

Redeclares org.hibernate.persister.entity.Loadable.isAbstract.

Is this an abstract class?

isExplicitPolymorphismback to summary
public boolean isExplicitPolymorphism()

Is this class explicit polymorphism only?

isMultiTableback to summary
public boolean isMultiTable()

Is the inheritance hierarchy described by this persister contained across multiple tables?

Returns:boolean

True if the inheritance hierarchy is spread across multiple tables; false otherwise.

isVersionPropertyInsertableback to summary
public boolean isVersionPropertyInsertable()

Is the version property included in insert statements?

propertySelectFragmentback to summary
public String propertySelectFragment(String alias, String suffix, boolean allProperties)

Given a query alias and an identifying suffix, render the property select fragment.

propertySelectFragmentFragmentback to summary
public SelectFragment propertySelectFragmentFragment(String alias, String suffix, boolean allProperties)
org.hibernate.persister.entity back to summary

public Class Queryable.Declarer

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final Queryable.Declarer
private final String
public static final Queryable.Declarer
public static final Queryable.Declarer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

CLASSback to summary
public static final Queryable.Declarer CLASS
nameback to summary
private final String name
SUBCLASSback to summary
public static final Queryable.Declarer SUBCLASS
SUPERCLASSback to summary
public static final Queryable.Declarer SUPERCLASS

Constructor Detail

Declarerback to summary
public Declarer(String name)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.