Examples of persistIfNeeded()


Examples of org.persvr.data.ObjectId.persistIfNeeded()

    }
    else
      tableId = getTableId(tableName);
    final Object id = objId.source == null ? getNextId(tableId, true) : parseIfPossible(subObjectId);
    if (objId.source == null)
      objId.persistIfNeeded(new StartAsEmptyPersister() {

        public String getObjectId() {
          //        if(id > -1)
          return tableId + "-" + id;
          /*
 
View Full Code Here

Examples of org.persvr.data.ObjectId.persistIfNeeded()

    long fieldValue = -1;
    if (value instanceof Persistable)
      value = ((Persistable) value).getId();
    if (value instanceof ObjectId) {
      ObjectId id = (ObjectId) value;
        id.persistIfNeeded(id.isPersisted() ? null
            : recordNewObject((ObjectId) value, convertToObjectId(referrer))); // persist into Object if we need to persist
      if (id.source instanceof DynaObjectDBSource && id.subObjectId != null && !"".equals(id.subObjectId)) {
        fieldType = OBJECT_TYPE;
        fieldValue = ((DynaObjectDBSource) id.source).convertId(id.subObjectId);
      } else
View Full Code Here

Examples of org.persvr.data.ObjectId.persistIfNeeded()

  }

  protected void handleNewObject(Object value, final String key, final String parentId){
    if (value instanceof ObjectId) {
      ObjectId id = (ObjectId) value;
        id.persistIfNeeded(new StartAsEmptyPersister(){

          @Override
          public void initializeAsList(List<? extends Object> values) throws Exception {
            int i = 0;
            for(Object value : values){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.