类 CompositePropertyMapping
- java.lang.Object
-
- org.hibernate.loader.plan.build.internal.spaces.CompositePropertyMapping
-
- 所有已实现的接口:
PropertyMapping
public class CompositePropertyMapping extends Object implements PropertyMapping
A PropertyMapping for handling composites! Woohoo! TODO : Consider moving this into the attribute/association walking SPI (org.hibernate.persister.walking) and having the notion of PropertyMapping built and exposed there There is duplication here too wrtComponentJoin.ComponentPropertyMapping. like above, consider moving to a singly-defined CompositePropertyMapping in the attribute/association walking SPI- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 CompositePropertyMapping(CompositeType compositeType, PropertyMapping parentPropertyMapping, String parentPropertyName)Builds a CompositePropertyMapping
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected voidcheckIncomingPropertyName(String propertyName)Used to check the validity of the propertyName argument passed intotoType(String),toColumns(String, String)andtoColumns(String).CompositeTypegetType()Get the type of the thing containing the propertiesprotected StringresolveParentPropertyPath(String propertyName)Builds the relative path.String[]toColumns(String propertyName)Given a property path, return the corresponding column name(s).String[]toColumns(String alias, String propertyName)Obtain aliased column/formula fragments for the specified property path.protected StringtoParentPropertyPath(String propertyName)Used to build a property path relative toparentPropertyMapping.TypetoType(String propertyName)Given a component path expression, get the type of the property
-
-
-
构造器详细资料
-
CompositePropertyMapping
public CompositePropertyMapping(CompositeType compositeType, PropertyMapping parentPropertyMapping, String parentPropertyName)
Builds a CompositePropertyMapping- 参数:
compositeType- The composite being described by this PropertyMappingparentPropertyMapping- The PropertyMapping of our parent (composites have to have a parent/owner)parentPropertyName- The name of this composite within the parentPropertyMapping
-
-
方法详细资料
-
toType
public Type toType(String propertyName) throws QueryException
从接口复制的说明:PropertyMappingGiven a component path expression, get the type of the property- 指定者:
toType在接口中PropertyMapping- 抛出:
QueryException
-
toParentPropertyPath
protected String toParentPropertyPath(String propertyName)
Used to build a property path relative toparentPropertyMapping. First, the incoming propertyName argument is validated (usingcheckIncomingPropertyName(java.lang.String)). Then the relative path is built (usingresolveParentPropertyPath(java.lang.String)).- 参数:
propertyName- The incoming propertyName.- 返回:
- The relative path.
-
checkIncomingPropertyName
protected void checkIncomingPropertyName(String propertyName)
Used to check the validity of the propertyName argument passed intotoType(String),toColumns(String, String)andtoColumns(String).- 参数:
propertyName- The incoming propertyName argument to validate
-
resolveParentPropertyPath
protected String resolveParentPropertyPath(String propertyName)
Builds the relative path. Used to delegatetoType(String),toColumns(String, String)andtoColumns(String)calls out toparentPropertyMapping. Called fromtoParentPropertyPath(java.lang.String). Override this to adjust how the relative property path is built for this mapping.- 参数:
propertyName- The incoming property name to "path append".- 返回:
- The relative path
-
toColumns
public String[] toColumns(String alias, String propertyName) throws QueryException
从接口复制的说明:PropertyMappingObtain aliased column/formula fragments for the specified property path.- 指定者:
toColumns在接口中PropertyMapping- 抛出:
QueryException
-
toColumns
public String[] toColumns(String propertyName) throws QueryException, UnsupportedOperationException
从接口复制的说明:PropertyMappingGiven a property path, return the corresponding column name(s).- 指定者:
toColumns在接口中PropertyMapping- 抛出:
QueryExceptionUnsupportedOperationException
-
getType
public CompositeType getType()
从接口复制的说明:PropertyMappingGet the type of the thing containing the properties- 指定者:
getType在接口中PropertyMapping
-
-