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

The following examples show how to use org.hibernate.LockMode#fromExternalForm() . These examples are extracted from open source projects. 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
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
public static LockMode fromXml(String name) {
	return LockMode.fromExternalForm( name );
}