Package net.sf.hibernate.lob

Examples of net.sf.hibernate.lob.BlobImpl


        File file = new File();
        file.setName(name);
        file.setContentType(contentType);
        file.setFileSize(size);
        if (data != null) {
            file.setData(new BlobImpl(data, (int)size));
        }
        ThreadSession.get().save(file);
        directory.getFiles().add(file);
        return file;
    }
View Full Code Here


    private static void createFile(Session session, Directory d, String name) throws HibernateException {
        File f1 = new File();
        f1.setContentType("text/plain");
        f1.setName(name);
        f1.setData(new BlobImpl("DATA".getBytes()));
        session.save(f1);
        d.getFiles().add(f1);
    }
View Full Code Here

TOP

Related Classes of net.sf.hibernate.lob.BlobImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.