Package org.jbpm.pvm.internal.lob

Examples of org.jbpm.pvm.internal.lob.Lob


    try {
      ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
      ObjectOutputStream objectStream = new ObjectOutputStream(byteStream);
      objectStream.writeObject(configuration);
      byte[] bytes = byteStream.toByteArray();
      configurationBytes = new Lob(bytes);
    } catch (Exception e) {
      throw new JbpmException("couldn't serialize configuration object for "+this, e);
    }
  }
View Full Code Here


      DbSession dbSession = Environment.getFromCurrent(DbSession.class, false);
      if (dbSession!=null) {
        dbSession.delete(this.lob);
      }
    }
    this.lob = new Lob((byte[])value);
  }
View Full Code Here

      bytes = IoUtil.readBytes(inputStream);
      inputStream.close();
    } catch (IOException e) {
      throw new JbpmException("couldn't read from "+streamInput, e);
    }
    Lob lob = new Lob(bytes);
    resources.put(name, lob);
    return this;
  }
View Full Code Here

    return resources.keySet();
  }
 
  public byte[] getBytes(String resourceName) {
    if (resources!=null) {
      Lob lob = resources.get(resourceName);
      if (lob!=null) {
        return lob.extractBytes();
      }
    }
    return null;
  }
View Full Code Here

    if (lob==null) return null;
    return lob.extractChars();
  }

  public void setObject(Object value) {
    this.lob = new Lob((char[])value);
  }
View Full Code Here

      throw new JbpmException("couldn't read from "+streamInput, e);
    }
   
    // Since this method is probably called outside an environment block, we
    // need to generate the dbid of the Lob later (during the actual deployment).
    Lob lob = new Lob(bytes, false);
    resources.put(name, lob);
   
    return this;
  }
View Full Code Here

    }
  }
 
  public byte[] getBytes(String resourceName) {
    if (resources!=null) {
      Lob lob = resources.get(resourceName);
      if (lob!=null) {
        return lob.extractBytes();
      }
    }
    return null;
  }
View Full Code Here

      DbSession dbSession = EnvironmentImpl.getFromCurrent(DbSession.class, false);
      if (dbSession!=null) {
        dbSession.delete(this.lob);
      }
    }
    this.lob = new Lob((byte[])value, true);
  }
View Full Code Here

    if (lob==null) return null;
    return lob.extractChars();
  }

  public void setObject(Object value) {
    this.lob = new Lob((char[])value, true);
  }
View Full Code Here

    try {
      ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
      ObjectOutputStream objectStream = new ObjectOutputStream(byteStream);
      objectStream.writeObject(configuration);
      byte[] bytes = byteStream.toByteArray();
      configurationBytes = new Lob(bytes, true);
    } catch (Exception e) {
      throw new JbpmException("couldn't serialize configuration object for "+this, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.lob.Lob

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.