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


Java EntityMode.parse方法代码示例

本文整理汇总了Java中org.hibernate.EntityMode.parse方法的典型用法代码示例。如果您正苦于以下问题:Java EntityMode.parse方法的具体用法?Java EntityMode.parse怎么用?Java EntityMode.parse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hibernate.EntityMode的用法示例。


在下文中一共展示了EntityMode.parse方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: read

import org.hibernate.EntityMode; //导入方法依赖的package包/类
@Override
public CacheKey read(ObjectDataInput in)
        throws IOException {

    try {
        Object key = in.readObject();
        Type type = in.readObject();
        String entityOrRoleName = in.readUTF();
        EntityMode entityMode = EntityMode.parse(in.readUTF());
        int hashCode = in.readInt();

        CacheKey cacheKey = (CacheKey) UNSAFE.allocateInstance(CacheKey.class);
        UNSAFE.putObjectVolatile(cacheKey, KEY_OFFSET, key);
        UNSAFE.putObjectVolatile(cacheKey, TYPE_OFFSET, type);
        UNSAFE.putObjectVolatile(cacheKey, ENTITY_OR_ROLE_NAME_OFFSET, entityOrRoleName);
        UNSAFE.putObjectVolatile(cacheKey, ENTITY_MODE_OFFSET, entityMode);
        UNSAFE.putIntVolatile(cacheKey, HASH_CODE_OFFSET, hashCode);
        return cacheKey;

    } catch (Exception e) {
        if (e instanceof IOException) {
            throw (IOException) e;
        }
        throw new IOException(e);
    }
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate,代码行数:27,代码来源:Hibernate3CacheKeySerializer.java

示例2: deserialize

import org.hibernate.EntityMode; //导入方法依赖的package包/类
/**
 * Custom deserialization routine used during deserialization of a
 * Session/PersistenceContext for increased performance.
 *
 * @param ois The stream from which to read the entry.
 * @param session The session being deserialized.
 * @return The deserialized EntityEntry
 * @throws IOException
 * @throws ClassNotFoundException
 */
static EntityEntry deserialize(
		ObjectInputStream ois,
        SessionImplementor session) throws IOException, ClassNotFoundException {
	return new EntityEntry(
			session.getFactory(),
	        ( String ) ois.readObject(),
			( Serializable ) ois.readObject(),
            EntityMode.parse( ( String ) ois.readObject() ),
			Status.parse( ( String ) ois.readObject() ),
            ( Object[] ) ois.readObject(),
            ( Object[] ) ois.readObject(),
            ( Object ) ois.readObject(),
            LockMode.parse( ( String ) ois.readObject() ),
            ois.readBoolean(),
            ois.readBoolean(),
            ois.readBoolean()
	);
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:29,代码来源:EntityEntry.java

示例3: getCustomTuplizerClassName

import org.hibernate.EntityMode; //导入方法依赖的package包/类
@Override
public String getCustomTuplizerClassName() {
	if ( entityElement.getTuplizer() == null ) {
		return null;
	}
	final EntityMode entityMode = determineEntityMode();
	for ( JaxbTuplizerElement tuplizerElement : entityElement.getTuplizer() ) {
		if ( entityMode == EntityMode.parse( tuplizerElement.getEntityMode() ) ) {
			return tuplizerElement.getClazz();
		}
	}
	return null;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:AbstractEntitySourceImpl.java

示例4: getExplicitTuplizerClassName

import org.hibernate.EntityMode; //导入方法依赖的package包/类
@Override
public String getExplicitTuplizerClassName() {
	if ( componentElement.getTuplizer() == null ) {
		return null;
	}
	final EntityMode entityMode = StringHelper.isEmpty( componentElement.getClazz() ) ? EntityMode.MAP : EntityMode.POJO;
	for ( JaxbTuplizerElement tuplizerElement : componentElement.getTuplizer() ) {
		if ( entityMode == EntityMode.parse( tuplizerElement.getEntityMode() ) ) {
			return tuplizerElement.getClazz();
		}
	}
	return null;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:ComponentAttributeSourceImpl.java

示例5: getExplicitTuplizerClassName

import org.hibernate.EntityMode; //导入方法依赖的package包/类
@Override
public String getExplicitTuplizerClassName() {
	if ( compositeElement.getTuplizer() == null ) {
		return null;
	}
	final EntityMode entityMode = StringHelper.isEmpty( compositeElement.getClazz() ) ? EntityMode.MAP : EntityMode.POJO;
	for ( JaxbTuplizerElement tuplizerElement : compositeElement.getTuplizer() ) {
		if ( entityMode == EntityMode.parse( tuplizerElement.getEntityMode() ) ) {
			return tuplizerElement.getClazz();
		}
	}
	return null;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:CompositePluralAttributeElementSourceImpl.java

示例6: deserialize

import org.hibernate.EntityMode; //导入方法依赖的package包/类
/**
 * Custom deserialization routine used during deserialization of a
 * Session/PersistenceContext for increased performance.
 *
 * @param ois The stream from which to read the entry.
 * @param session The session being deserialized.
 * @return The deserialized CollectionKey
 * @throws IOException
 * @throws ClassNotFoundException
 */
static CollectionKey deserialize(
		ObjectInputStream ois,
        SessionImplementor session) throws IOException, ClassNotFoundException {
	return new CollectionKey(
			( String ) ois.readObject(),
	        ( Serializable ) ois.readObject(),
	        ( Type ) ois.readObject(),
	        EntityMode.parse( ( String ) ois.readObject() ),
	        session.getFactory()
	);
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:22,代码来源:CollectionKey.java

示例7: deserialize

import org.hibernate.EntityMode; //导入方法依赖的package包/类
/**
 * Custom deserialization routine used during deserialization of a
 * Session/PersistenceContext for increased performance.
 *
 * @param ois The stream from which to read the entry.
 * @param session The session being deserialized.
 * @return The deserialized EntityEntry
 * @throws IOException
 * @throws ClassNotFoundException
 */
static EntityKey deserialize(
		ObjectInputStream ois,
        SessionImplementor session) throws IOException, ClassNotFoundException {
	return new EntityKey(
			( Serializable ) ois.readObject(),
	        ( String ) ois.readObject(),
	        ( String ) ois.readObject(),
	        ( Type ) ois.readObject(),
	        ois.readBoolean(),
	        session.getFactory(),
	        EntityMode.parse( ( String ) ois.readObject() )
	);
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:24,代码来源:EntityKey.java

示例8: readObject

import org.hibernate.EntityMode; //导入方法依赖的package包/类
/**
 * Used by JDK serialization...
 *
 * @param ois The input stream from which we are being read...
 * @throws IOException Indicates a general IO stream exception
 * @throws ClassNotFoundException Indicates a class resolution issue
 */
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
	log.trace( "deserializing session" );

	boolean isRootSession = ois.readBoolean();
	connectionReleaseMode = ConnectionReleaseMode.parse( ( String ) ois.readObject() );
	entityMode = EntityMode.parse( ( String ) ois.readObject() );
	autoClear = ois.readBoolean();
	flushMode = FlushMode.parse( ( String ) ois.readObject() );
	cacheMode = CacheMode.parse( ( String ) ois.readObject() );
	flushBeforeCompletionEnabled = ois.readBoolean();
	autoCloseSessionEnabled = ois.readBoolean();
	fetchProfile = ( String ) ois.readObject();
	interceptor = ( Interceptor ) ois.readObject();

	factory = SessionFactoryImpl.deserialize( ois );
	listeners = factory.getEventListeners();

	if ( isRootSession ) {
		jdbcContext = JDBCContext.deserialize( ois, this, interceptor );
	}

	persistenceContext = StatefulPersistenceContext.deserialize( ois, this );
	actionQueue = ActionQueue.deserialize( ois, this );

	enabledFilters = ( Map ) ois.readObject();
	childSessionsByEntityMode = ( Map ) ois.readObject();

	Iterator iter = enabledFilters.values().iterator();
	while ( iter.hasNext() ) {
		( ( FilterImpl ) iter.next() ).afterDeserialize(factory);
	}

	if ( isRootSession && childSessionsByEntityMode != null ) {
		iter = childSessionsByEntityMode.values().iterator();
		while ( iter.hasNext() ) {
			final SessionImpl child = ( ( SessionImpl ) iter.next() );
			child.rootSession = this;
			child.jdbcContext = this.jdbcContext;
		}
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:49,代码来源:SessionImpl.java

示例9: deserialize

import org.hibernate.EntityMode; //导入方法依赖的package包/类
/**
 * Custom deserialization routine used during deserialization of a
 * Session/PersistenceContext for increased performance.
 *
 * @param ois The stream from which to read the entry.
 * @param session The session being deserialized.
 *
 * @return The deserialized CollectionKey
 *
 * @throws IOException
 * @throws ClassNotFoundException
 */
public static CollectionKey deserialize(
		ObjectInputStream ois,
		SessionImplementor session) throws IOException, ClassNotFoundException {
	return new CollectionKey(
			(String) ois.readObject(),
			(Serializable) ois.readObject(),
			(Type) ois.readObject(),
			EntityMode.parse( (String) ois.readObject() ),
			(session == null ? null : session.getFactory())
	);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:24,代码来源:CollectionKey.java


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