Examples of Persistent


Examples of br.com.procempa.modus.entity.Persistent

    this.tableMouseListener = mouseListener;
    table.addMouseListener(mouseListener);
  }
 
  public Persistent getSelectedData() {
    Persistent persistent = null;
    int row = getTable().getSelectedRow();
    if (getTable().getModel().getRowCount() > 0) {
      if (row == -1) {
        row = 0;
      }
View Full Code Here

Examples of br.jus.tjrn.arq.persistence.Persistent

     * para poder resgatá-lo posteriormente.
     */
    @Override
    public String getAsString(FacesContext ctx, UIComponent component, Object value) {
        if (value != null && !"".equals(value)) {
            Persistent entity = (Persistent) value;
            // adiciona item como atributo do componente
            this.addAttribute(component, entity);

            Integer codigo = entity.getId();
            if (codigo != null) {
                return String.valueOf(codigo);
            }
        }

View Full Code Here

Examples of civquest.io.Persistent

  }

  private DataToSave constructDataToSave() {
    DataToSave data = new DataToSave();

    Persistent game = Game.getGame();
      data.put("game", game);
    return data;
  }
View Full Code Here

Examples of com.antlersoft.odb.Persistent

    for ( Iterator i=entries.iterator(); i.hasNext();)
      ((UnitEntry)i.next()).clearIfObsolete( possible_clear);
    entries=null;
    for ( Iterator i=possible_clear.iterator(); i.hasNext();)
    {
      Persistent p=(Persistent)((ObjectRef)i.next()).getReferenced();
      if ( ! m_session.greaterThanOrEqualEntries( UnitEntry.ENTRY_INDEX_NAME,
        new ObjectRefKey(p)).isExactMatch())
        m_session.deleteObject( p);
    }
    m_session.commit();
View Full Code Here

Examples of de.iritgo.aktera.persist.Persistent

   */
  public void validatePersistents(List<Configuration> persistentConfig, ModelRequest request, ModelResponse response,
          FormularDescriptor formular, PersistentDescriptor persistents, boolean create,
          ValidationResult result) throws ModelException, PersistenceException
  {
    Persistent script = persistents.getPersistent("script");

    try
    {
      scriptManager.check(script.getFieldString("code"), script.getFieldString("language"));
    }
    catch (ScriptCompilerException x)
    {
      FormTools.addError(response, result, "script.code", "#\n" + x.getMessage());
      FormTools.addError(response, result, "script.aaa", "aktera-script:scriptCodeContainsErrors");
View Full Code Here

Examples of org.apache.cayenne.Persistent

            while (it.hasNext()) {
                Map.Entry entry = (Map.Entry) it.next();

                ObjectId id = (ObjectId) entry.getKey();

                Persistent object = (Persistent) objectStore.getNode(id);

                // address manual id override.
                ObjectId objectId = object.getObjectId();
                if (!id.equals(objectId)) {

                    if (objectId != null) {
                        Map replacement = id.getReplacementIdMap();
                        replacement.clear();
                        replacement.putAll(objectId.getIdSnapshot());
                    }

                    object.setObjectId(id);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.cayenne.Persistent

        Map modified = null;
        Object eventPostedBy = null;

        for (int i = 0; i < size; i++) {
            Persistent object = (Persistent) objects.get(i);

            // skip HOLLOW objects as they likely were created from partial snapshots
            if (object.getPersistenceState() == PersistenceState.HOLLOW) {
                continue;
            }

            ObjectId oid = object.getObjectId();

            // add snapshots if refresh is forced, or if a snapshot is
            // missing

            DataRow cachedSnapshot = (DataRow) this.snapshots.get(oid);
            if (refresh || cachedSnapshot == null) {

                DataRow newSnapshot = (DataRow) snapshots.get(i);

                if (cachedSnapshot != null) {
                    // use old snapshot if no changes occurred
                    if (object instanceof DataObject
                            && cachedSnapshot.equals(newSnapshot)) {
                        ((DataObject) object).setSnapshotVersion(cachedSnapshot
                                .getVersion());
                        continue;
                    }
                    else {
                        newSnapshot.setReplacesVersion(cachedSnapshot.getVersion());
                    }
                }

                if (modified == null) {
                    modified = new HashMap();
                    eventPostedBy = object.getObjectContext().getGraphManager();
                }

                modified.put(oid, newSnapshot);
            }
        }
View Full Code Here

Examples of org.apache.cayenne.Persistent

        // guess target collection size
        Collection objects = new ArrayList(len > 100 ? len / 2 : len);

        Iterator it = getObjectStore().getObjectIterator();
        while (it.hasNext()) {
            Persistent object = (Persistent) it.next();
            int state = object.getPersistenceState();
            if (state == PersistenceState.MODIFIED
                    || state == PersistenceState.NEW
                    || state == PersistenceState.DELETED) {

                objects.add(object);
View Full Code Here

Examples of org.apache.cayenne.Persistent

        // objects where fetched as a part of the same query, as they may belong to
        // different subclasses
        ClassDescriptor descriptor = getEntityResolver().getClassDescriptor(
                id.getEntityName());

        Persistent cachedObject = (Persistent) getGraphManager().getNode(id);

        // merge into an existing object
        if (cachedObject != null) {

            int state = cachedObject.getPersistenceState();

            // TODO: Andrus, 1/24/2006 implement smart merge for modified objects...
            if (cachedObject != prototype
                    && state != PersistenceState.MODIFIED
                    && state != PersistenceState.DELETED) {

                descriptor.injectValueHolders(cachedObject);

                if (prototype != null
                        && prototype.getPersistenceState() != PersistenceState.HOLLOW) {

                    descriptor.shallowMerge(prototype, cachedObject);

                    if (state == PersistenceState.HOLLOW) {
                        cachedObject.setPersistenceState(PersistenceState.COMMITTED);
                    }
                }
            }

            return cachedObject;
        }
        // create and merge into a new object
        else {

            Persistent localObject = (Persistent) descriptor.createObject();

            localObject.setObjectContext(this);
            localObject.setObjectId(id);

            getGraphManager().registerNode(id, localObject);

            if (prototype != null
                    && prototype.getPersistenceState() != PersistenceState.HOLLOW) {
                localObject.setPersistenceState(PersistenceState.COMMITTED);
                descriptor.injectValueHolders(localObject);
                descriptor.shallowMerge(prototype, localObject);
            }
            else {
                localObject.setPersistenceState(PersistenceState.HOLLOW);
            }

            return localObject;
        }
    }
View Full Code Here

Examples of org.apache.cayenne.Persistent

                Iterator it = addedToUnresolved.iterator();
                while (it.hasNext()) {
                    Object next = it.next();

                    if (next instanceof Persistent) {
                        Persistent dataObject = (Persistent) next;
                        if (dataObject.getPersistenceState() == PersistenceState.TRANSIENT) {
                            continue;
                        }
                    }

                    if (!fetchedList.contains(next)) {
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.