Java Code Examples for org.hibernate.LockMode#fromExternalForm()

The following examples show how to use org.hibernate.LockMode#fromExternalForm() . 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: QueryHintDefinition.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public LockMode getLockMode(String query) {
	String hitName = QueryHints.NATIVE_LOCKMODE;
	String value =(String) hintsMap.get( hitName );
	if ( value == null ) {
		return null;
	}
	try {
		return LockMode.fromExternalForm( value );
	}
	catch ( MappingException e ) {
		throw new AnnotationException( "Unknown LockMode in hint: " + query + ":" + hitName, e );
	}
}
 
Example 2
Source File: LockModeConverter.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public static LockMode fromXml(String name) {
	return LockMode.fromExternalForm( name );
}