Java Code Examples for org.hibernate.Session.getLobHelper()

The following are Jave code examples for showing how to use getLobHelper() of the org.hibernate.Session class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: esup-sgc   File: BigFile.java   View Source Code Vote up 4 votes
public void setBinaryFileStream(InputStream inputStream, long length) {		
    if (this.entityManager == null) this.entityManager = entityManager();
    Session session = (Session) this.entityManager.getDelegate(); 
    LobHelper helper = session.getLobHelper(); 
    this.binaryFile = helper.createBlob(inputStream, length); 
}
 
Example 2
Project: esup-sgc   File: BigFile.java   View Source Code Vote up 4 votes
public void setBinaryFile(byte[] bytes) {		
    if (this.entityManager == null) this.entityManager = entityManager();
    Session session = (Session) this.entityManager.getDelegate(); 
    LobHelper helper = session.getLobHelper(); 
    this.binaryFile = helper.createBlob(bytes); 
}