org.hibernate.usertype.UserCollectionType Java Examples

The following examples show how to use org.hibernate.usertype.UserCollectionType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CustomCollectionType.java    From cacheonix-core with GNU Lesser General Public License v2.1 6 votes vote down vote up
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 );
}
 
Example #2
Source File: CustomCollectionType.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
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() );
	}
}
 
Example #3
Source File: CustomCollectionType.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public UserCollectionType getUserType() {
	return userType;
}
 
Example #4
Source File: CustomCollectionType.java    From cacheonix-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
public UserCollectionType getUserType() {
	return userType;
}