本文整理汇总了Java中org.hibernate.persister.collection.CollectionPersister.readElement方法的典型用法代码示例。如果您正苦于以下问题:Java CollectionPersister.readElement方法的具体用法?Java CollectionPersister.readElement怎么用?Java CollectionPersister.readElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hibernate.persister.collection.CollectionPersister
的用法示例。
在下文中一共展示了CollectionPersister.readElement方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFrom
import org.hibernate.persister.collection.CollectionPersister; //导入方法依赖的package包/类
@Override
public Object readFrom(
ResultSet rs,
CollectionPersister persister,
CollectionAliases descriptor,
Object owner) throws HibernateException, SQLException {
final Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() );
final Object old = identifiers.put(
values.size(),
persister.readIdentifier( rs, descriptor.getSuffixedIdentifierAlias(), getSession() )
);
if ( old == null ) {
//maintain correct duplication if loaded in a cartesian product
values.add( element );
}
return element;
}
示例2: readFrom
import org.hibernate.persister.collection.CollectionPersister; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Object readFrom(
ResultSet rs,
CollectionPersister persister,
CollectionAliases descriptor,
Object owner) throws HibernateException, SQLException {
final Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() );
if ( element != null ) {
final Object index = persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() );
if ( loadingEntries == null ) {
loadingEntries = new ArrayList<Object[]>();
}
loadingEntries.add( new Object[] { index, element } );
}
return element;
}
示例3: readFrom
import org.hibernate.persister.collection.CollectionPersister; //导入方法依赖的package包/类
@Override
@SuppressWarnings({"deprecation", "unchecked"})
public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)
throws HibernateException, SQLException {
final Object object = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() );
final Type elementType = persister.getElementType();
final SessionFactoryImplementor factory = persister.getFactory();
final String indexNode = getIndexAttributeName( persister );
final Element elem = element.addElement( persister.getElementNodeName() );
elementType.setToXMLNode( elem, object, factory );
final Type indexType = persister.getIndexType();
final Object indexValue = persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() );
final String index = ( (XmlRepresentableType) indexType ).toXMLString( indexValue, factory );
setIndex( elem, indexNode, index );
return object;
}
示例4: readFrom
import org.hibernate.persister.collection.CollectionPersister; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)
throws HibernateException, SQLException {
final Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() ) ;
final int index = (Integer) persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() );
//pad with nulls from the current last element up to the new index
for ( int i = list.size(); i<=index; i++) {
list.add( i, null );
}
list.set( index, element );
return element;
}
示例5: readFrom
import org.hibernate.persister.collection.CollectionPersister; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)
throws HibernateException, SQLException {
// note that if we load this collection from a cartesian product
// the multiplicity would be broken ... so use an idbag instead
final Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() ) ;
if ( element != null ) {
bag.add( element );
}
return element;
}
示例6: readFrom
import org.hibernate.persister.collection.CollectionPersister; //导入方法依赖的package包/类
@Override
@SuppressWarnings("deprecation")
public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)
throws HibernateException, SQLException {
final Object object = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() );
final Type elementType = persister.getElementType();
final Element subElement = element.addElement( persister.getElementNodeName() );
elementType.setToXMLNode( subElement, object, persister.getFactory() );
return object;
}
示例7: readFrom
import org.hibernate.persister.collection.CollectionPersister; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)
throws HibernateException, SQLException {
final Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() );
final int index = (Integer) persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() );
for ( int i = tempList.size(); i<=index; i++) {
tempList.add( i, null );
}
tempList.set( index, element );
return element;
}
示例8: readFrom
import org.hibernate.persister.collection.CollectionPersister; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Object readFrom(
ResultSet rs,
CollectionPersister persister,
CollectionAliases descriptor,
Object owner) throws HibernateException, SQLException {
final Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() );
if ( element != null ) {
tempList.add( element );
}
return element;
}