Java 类org.hibernate.usertype.UserCollectionType 实例源码

项目:cacheonix-core    文件:CustomCollectionType.java   
public CustomCollectionType(Class userTypeClass, String role, String foreignKeyPropertyName, boolean isEmbeddedInXML) {
    super(role, foreignKeyPropertyName, isEmbeddedInXML);

    if ( !UserCollectionType.class.isAssignableFrom( userTypeClass ) ) {
        throw new MappingException( "Custom type does not implement UserCollectionType: " + userTypeClass.getName() );
    }

    try {
        userType = ( UserCollectionType ) userTypeClass.newInstance();
    }
    catch ( InstantiationException ie ) {
        throw new MappingException( "Cannot instantiate custom type: " + userTypeClass.getName() );
    }
    catch ( IllegalAccessException iae ) {
        throw new MappingException( "IllegalAccessException trying to instantiate custom type: " + userTypeClass.getName() );
    }

    customLogging = LoggableUserType.class.isAssignableFrom( userTypeClass );
}
项目:lams    文件:CustomCollectionType.java   
private static UserCollectionType createUserCollectionType(Class userTypeClass) {
    if ( !UserCollectionType.class.isAssignableFrom( userTypeClass ) ) {
        throw new MappingException( "Custom type does not implement UserCollectionType: " + userTypeClass.getName() );
    }

    try {
        return ( UserCollectionType ) userTypeClass.newInstance();
    }
    catch ( InstantiationException ie ) {
        throw new MappingException( "Cannot instantiate custom type: " + userTypeClass.getName() );
    }
    catch ( IllegalAccessException iae ) {
        throw new MappingException( "IllegalAccessException trying to instantiate custom type: " + userTypeClass.getName() );
    }
}
项目:lams    文件:CustomCollectionType.java   
public UserCollectionType getUserType() {
    return userType;
}
项目:cacheonix-core    文件:CustomCollectionType.java   
public UserCollectionType getUserType() {
    return userType;
}