Hibernate ORM Origin - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM Origin class.

This code example shows how to use the following methods: getName, getType
	public MappingNotFoundException(String message, Origin origin) {
		super( message, origin );
	} 
 
	public MappingNotFoundException(Origin origin) {
		super( String.format( "Mapping (%s) not found : %s", origin.getType(), origin.getName() ), origin );
	} 
 
	public MappingNotFoundException(String message, Throwable root, Origin origin) {
		super( message, root, origin );
	} 
 
	public MappingNotFoundException(Throwable root, Origin origin) {
		super( String.format( "Mapping (%s) not found : %s", origin.getType(), origin.getName() ), root, origin );
	} 
} 
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: getName, getType
	public InvalidMappingException(String customMessage, XmlDocument xmlDocument) {
		this( customMessage, xmlDocument.getOrigin().getType(), xmlDocument.getOrigin().getName() );
	} 
 
	public InvalidMappingException(String customMessage, Origin origin) {
		this( customMessage, origin.getType().toString(), origin.getName() );
	} 
 
	public InvalidMappingException(String type, String path) {
		this("Could not parse mapping document from " + type + (path==null?"":" " + path), type, path);
	} 
 
	public InvalidMappingException(String type, String path, Throwable cause) {
		this("Could not parse mapping document from " + type + (path==null?"":" " + path), type, path, cause);		
	} 
 
	public String getType() {
		return type;
	} 
	 
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        JAXBContext jc = JAXBContext.newInstance( clazz ); 
        Unmarshaller unmarshaller = jc.createUnmarshaller(); 
        unmarshaller.setSchema( schema ); 
        StreamSource stream = new StreamSource( in ); 
        JAXBElement<T> elem = unmarshaller.unmarshal( stream, clazz ); 
        Origin origin = new Origin( null, fileName ); 
        return new JaxbRoot<T>( elem.getValue(), origin ); 
    } 
 
    private static Schema getMappingSchema(String schemaVersion, ClassLoaderService classLoaderService) { 
        URL schemaUrl = classLoaderService.locateResource( schemaVersion ); 
        SchemaFactory sf = SchemaFactory.newInstance( javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI ); 
        Schema schema = null; 
        try { 
            schema = sf.newSchema( schemaUrl ); 
        } 
        catch ( SAXException e ) { 
            LOG.debugf( "Unable to create schema for %s: %s", schemaVersion, e.getMessage() ); 
        } 
        return schema; 
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Hibernate ORM Origin Methods: