Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
readme.txt | 2015-02-11 | 1.4 kB | |
koru_struts_example_project.1.4.1.zip | 2015-02-06 | 9.1 MB | |
how_to_start.1.4.1.zip | 2015-02-05 | 9.3 MB | |
koru.docs.API.1.4.1.zip | 2015-02-05 | 127.0 kB | |
koru.dist.1.4.1.zip | 2015-02-05 | 8.2 MB | |
koru.sqlserver.properties | 2015-02-04 | 551 Bytes | |
koru.properties | 2015-02-04 | 579 Bytes | |
koru.oracle.properties | 2015-02-04 | 398 Bytes | |
koru.mysql.properties | 2015-02-04 | 582 Bytes | |
Totals: 9 Items | 26.7 MB | 0 |
What's new in Koru 1.4.1 ? 1.Fixed a bug about parsing the SQL clause with the negative value. 2.Supports java.sql.Blob type now. 3.Added a new class 'org.koru.core.BlobTool' which helps to create blob object including two static methods: 1)public static Blob createBlob(java.io.InputStream inputStream) 2)public static Blob createBlob(byte[] bytes) ------------------------------------------------------ How to insert the blob data into database? If the database is MYSQL,MS SqlServer and so on: Assumes the object 'p'(the instance of persistent class Post) has a property named 'picBlobData' of java.sql.Blob type, so: Blob blob=BlobTool.createBlob(inputStream); //or Blob blob=BlobTool.createBlob(bytes); p.setPicBlobData(blob); m.add(p);//'m' is a Model instance But if the database is ORACLE, it's a little special because the jdbc driver of ORALCE: Firstly,the type of the Blob property should be oracle.sql.BLOB. Secondly,Assumes the persistent object 'p' has a property named 'picBlobData' of oracle.sql.BLOB type, then: Post insertedPost=(Post)m.add(p); Blob blob=BlobTool.createBlob(inputStream); //or Blob blob=BlobTool.createBlob(bytes); m.where("postId="+insertedPost.getPostId().intValue());//locate the inserted row in database m.updateFieldValue("picBlobData",blob.getBinaryStream());//insert blob data to database by rockydan 4/2/2015