当前位置: 首页>>代码示例>>Java>>正文


Java CollectionPersister.readElement方法代码示例

本文整理汇总了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;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:PersistentIdentifierBag.java

示例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;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:18,代码来源:PersistentMap.java

示例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;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:PersistentIndexedElementHolder.java

示例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;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:PersistentList.java

示例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;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:PersistentBag.java

示例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;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:PersistentElementHolder.java

示例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;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:PersistentArrayHolder.java

示例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;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:PersistentSet.java


注:本文中的org.hibernate.persister.collection.CollectionPersister.readElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。