类 ArrayType
- java.lang.Object
-
- org.hibernate.type.AbstractType
-
- org.hibernate.type.CollectionType
-
- org.hibernate.type.ArrayType
-
- 所有已实现的接口:
Serializable,AssociationType,Type
public class ArrayType extends CollectionType
A type for persistent arrays.- 作者:
- Gavin King
- 另请参阅:
- 序列化表格
-
-
字段概要
-
从类继承的字段 org.hibernate.type.CollectionType
UNFETCHED_COLLECTION
-
从类继承的字段 org.hibernate.type.AbstractType
LEGACY_DEFAULT_SIZE, LEGACY_DICTATED_SIZE
-
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 IteratorgetElementsIterator(Object collection)Not defined for collections of primitive typeClassgetReturnedClass()booleanhasHolder()ObjectindexOf(Object array, Object element)protected booleaninitializeImmediately()Objectinstantiate(int anticipatedSize)Instantiate an empty instance of the "underlying" collection (not a wrapper), but with the given anticipated size (i.e. accounting for initial capacity and perhaps load factor).PersistentCollectioninstantiate(SharedSessionContractImplementor session, CollectionPersister persister, Serializable key)Instantiate an uninitialized collection wrapper or holder.ObjectinstantiateResult(Object original)Instantiate a new "underlying" collection exhibiting the same capacity characteristics and the passed "original".booleanisArrayType()ObjectreplaceElements(Object original, Object target, Object owner, Map copyCache, SharedSessionContractImplementor session)Replace the elements of a collection with the elements of another collection.StringtoLoggableString(Object value, SessionFactoryImplementor factory)Generate a representation of the value for logging purposes.PersistentCollectionwrap(SharedSessionContractImplementor session, Object array)Wrap the naked collection instance in a wrapper, or instantiate a holder.-
从类继承的方法 org.hibernate.type.CollectionType
assemble, compare, contains, deepCopy, defaultSizes, dictatedSizes, disassemble, getAssociatedEntityName, getAssociatedJoinable, getCollection, getColumnSpan, getElementsIterator, getElementType, getForeignKeyDirection, getHashCode, getIdOfOwnerOrNull, getKeyOfOwner, getLHSPropertyName, getName, getOnCondition, getOnCondition, getRHSUniqueKeyPropertyName, getRole, hydrate, isAlwaysDirtyChecked, isAssociationType, isCollectionType, isDirty, isDirty, isEqual, isModified, isMutable, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, renderLoggableString, replace, resolve, resolve, semiResolve, sqlTypes, toColumnNullness, toString, useLHSPrimaryKey
-
从类继承的方法 org.hibernate.type.AbstractType
beforeAssemble, getHashCode, getSemiResolvedType, isAnyType, isComponentType, isEntityType, isEqual, isSame, replace
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 org.hibernate.type.Type
beforeAssemble, getHashCode, getSemiResolvedType, isAnyType, isComponentType, isEntityType, isEqual, isSame, replace
-
-
-
-
构造器详细资料
-
ArrayType
@Deprecated public ArrayType(TypeFactory.TypeScope typeScope, String role, String propertyRef, Class elementClass)
已过时。Use the other constructor
-
-
方法详细资料
-
getReturnedClass
public Class getReturnedClass()
从接口复制的说明:TypeThe class returned byType.nullSafeGet(java.sql.ResultSet, java.lang.String[], org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object)methods. This is used to establish the class of an array of this type.- 返回:
- The java type class handled by this type.
-
instantiate
public PersistentCollection instantiate(SharedSessionContractImplementor session, CollectionPersister persister, Serializable key) throws HibernateException
从类复制的说明:CollectionTypeInstantiate an uninitialized collection wrapper or holder. Callers MUST add the holder to the persistence context!- 指定者:
instantiate在类中CollectionType- 参数:
session- The session from which the request is originating.persister- The underlying collection persister (metadata)key- The owner key.- 返回:
- The instantiated collection.
- 抛出:
HibernateException
-
getElementsIterator
public Iterator getElementsIterator(Object collection)
Not defined for collections of primitive type- 覆盖:
getElementsIterator在类中CollectionType- 参数:
collection- The collection to be iterated- 返回:
- The iterator.
-
wrap
public PersistentCollection wrap(SharedSessionContractImplementor session, Object array)
从类复制的说明:CollectionTypeWrap the naked collection instance in a wrapper, or instantiate a holder. Callers MUST add the holder to the persistence context!- 指定者:
wrap在类中CollectionType- 参数:
session- The session from which the request is originating.array- The bare collection to be wrapped.- 返回:
- The wrapped collection.
-
isArrayType
public boolean isArrayType()
- 覆盖:
isArrayType在类中CollectionType
-
toLoggableString
public String toLoggableString(Object value, SessionFactoryImplementor factory) throws HibernateException
从接口复制的说明:TypeGenerate a representation of the value for logging purposes.- 指定者:
toLoggableString在接口中Type- 覆盖:
toLoggableString在类中CollectionType- 参数:
value- The value to be loggedfactory- The session factory- 返回:
- The loggable representation
- 抛出:
HibernateException- An error from Hibernate
-
instantiateResult
public Object instantiateResult(Object original)
从类复制的说明:CollectionTypeInstantiate a new "underlying" collection exhibiting the same capacity characteristics and the passed "original".- 覆盖:
instantiateResult在类中CollectionType- 参数:
original- The original collection.- 返回:
- The newly instantiated collection.
-
replaceElements
public Object replaceElements(Object original, Object target, Object owner, Map copyCache, SharedSessionContractImplementor session) throws HibernateException
从类复制的说明:CollectionTypeReplace the elements of a collection with the elements of another collection.- 覆盖:
replaceElements在类中CollectionType- 参数:
original- The 'source' of the replacement elements (where we copy from)target- The target of the replacement elements (where we copy to)owner- The owner of the collection being mergedcopyCache- The map of elements already replaced.session- The session from which the merge event originated.- 返回:
- The merged collection.
- 抛出:
HibernateException
-
instantiate
public Object instantiate(int anticipatedSize)
从类复制的说明:CollectionTypeInstantiate an empty instance of the "underlying" collection (not a wrapper), but with the given anticipated size (i.e. accounting for initial capacity and perhaps load factor).- 指定者:
instantiate在类中CollectionType- 参数:
anticipatedSize- The anticipated size of the instantiated collection after we are done populating it.- 返回:
- A newly instantiated collection to be wrapped.
-
indexOf
public Object indexOf(Object array, Object element)
- 覆盖:
indexOf在类中CollectionType
-
initializeImmediately
protected boolean initializeImmediately()
- 覆盖:
initializeImmediately在类中CollectionType
-
hasHolder
public boolean hasHolder()
- 覆盖:
hasHolder在类中CollectionType
-
-