示例#1
0
 /**
  * This method should be called before saving the deployment. It will assign a generated dbid to
  * the resource Lobs.
  *
  * <p>Note: when using a database, this method must be called within an environment block!
  */
 public void initResourceLobDbids() {
   if (resources != null) {
     for (Lob resource : resources.values()) {
       long resourceDbid = DbidGenerator.getDbidGenerator().getNextId();
       resource.setDbid(resourceDbid);
     }
   }
 }
示例#2
0
 public byte[] getBytes(String resourceName) {
   if (resources != null) {
     Lob lob = resources.get(resourceName);
     if (lob != null) {
       return lob.extractBytes();
     }
   }
   return null;
 }