Examples of jdoGetObjectId()


Examples of javax.jdo.spi.PersistenceCapable.jdoGetObjectId()

    public void storeObjectField(int fieldNumber, Object value)
    {
        if (om.getApiAdapter().isPersistable(value))
        {
            PersistenceCapable pc = (PersistenceCapable)value;
            pc.jdoCopyKeyFieldsFromObjectId(this, pc.jdoGetObjectId());
        }
        else
        {
            JavaTypeMapping mapping = javaTypeMappings[mappingNum++];
            mapping.setObject(om, statement, getParamsForField(mapping), value);
View Full Code Here

Examples of javax.jdo.spi.PersistenceCapable.jdoGetObjectId()

        if (pc != null && pc instanceof PersistenceCapable)
        {
            PersistenceCapable p = (PersistenceCapable) pc;
            if (p.jdoIsPersistent() || p.jdoIsDetached())
            {
                return p.jdoGetObjectId();
            }
        }
        return null;
    }
View Full Code Here

Examples of javax.jdo.spi.PersistenceCapable.jdoGetObjectId()

    public void storeObjectField(int fieldNumber, Object value)
    {
        if (ec.getApiAdapter().isPersistable(value))
        {
            PersistenceCapable pc = (PersistenceCapable)value;
            pc.jdoCopyKeyFieldsFromObjectId(this, pc.jdoGetObjectId());
        }
        else
        {
            JavaTypeMapping mapping = javaTypeMappings[mappingNum++];
            mapping.setObject(ec, statement, getParamsForField(mapping), value);
View Full Code Here

Examples of javax.jdo.spi.PersistenceCapable.jdoGetObjectId()

public class Utils {

    @SuppressWarnings("unused")
    private static Object jdoObjectIdFor(InstanceLifecycleEvent event) {
        PersistenceCapable persistenceCapable = Utils.persistenceCapableFor(event);
        Object jdoObjectId = persistenceCapable.jdoGetObjectId();
        return jdoObjectId;
    }

    static PersistenceCapable persistenceCapableFor(InstanceLifecycleEvent event) {
        return (PersistenceCapable)event.getSource();
View Full Code Here

Examples of javax.jdo.spi.PersistenceCapable.jdoGetObjectId()

        if (pc != null && pc instanceof PersistenceCapable)
        {
            PersistenceCapable p = (PersistenceCapable) pc;
            if (p.jdoIsPersistent() || p.jdoIsDetached())
            {
                return p.jdoGetObjectId();
            }
        }
        return null;
    }
View Full Code Here

Examples of javax.jdo.spi.PersistenceCapable.jdoGetObjectId()

    public Object go() {
  Iterator i = collection.iterator();
  while (i.hasNext()) {
      PersistenceCapable pc = (PersistenceCapable) i.next();
      System.out.println("Result: " + pc.jdoGetObjectId());
      boolean loop = true;
      while (loop) {
    System.out.print("[E] Edit, [R] Remove, [X] Exit, [N] Next: ");
    String choice = readLine();
    switch (choice.charAt(0)) {
View Full Code Here

Examples of javax.jdo.spi.PersistenceCapable.jdoGetObjectId()

                     * activity if the fields were already set to the right values.
                     */
                    PersistenceCapable newValuePC = (PersistenceCapable)newValue;
                    if (om != ObjectManagerHelper.getObjectManager(newValue))
                    {
                        throw new JPOXUserException(LOCALISER.msg("RDBMS.SCO.Map.WriteValudInvalidWithDifferentPM"), newValuePC.jdoGetObjectId());
                    }

                    StateManager vsm = om.findStateManager(newValue);
                   
                    // Ensure the current owner field is loaded, and replace with new value
View Full Code Here

Examples of javax.jdo.spi.PersistenceCapable.jdoGetObjectId()

    {
        if (ec.getApiAdapter().isPersistable(value))
        {
            PersistenceCapable pc = (PersistenceCapable)value;
            // TODO Not checked this when we have compound identity and a sub-EmbeddedId
            pc.jdoCopyKeyFieldsFromObjectId(this, pc.jdoGetObjectId());
        }
        else
        {
            JavaTypeMapping mapping = javaTypeMappings[mappingNum++];
            mapping.setObject(ec, statement, getParamsForField(mapping), value);
View Full Code Here

Examples of javax.jdo.spi.PersistenceCapable.jdoGetObjectId()

public class Utils {

    @SuppressWarnings("unused")
    private static Object jdoObjectIdFor(InstanceLifecycleEvent event) {
        PersistenceCapable persistenceCapable = Utils.persistenceCapableFor(event);
        Object jdoObjectId = persistenceCapable.jdoGetObjectId();
        return jdoObjectId;
    }

    static PersistenceCapable persistenceCapableFor(InstanceLifecycleEvent event) {
        return (PersistenceCapable)event.getSource();
View Full Code Here

Examples of javax.jdo.spi.PersistenceCapable.jdoGetObjectId()

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("JPA Merge: - entity: " + entity);
        }
        if (entity instanceof PersistenceCapable) {
            PersistenceCapable pc = (PersistenceCapable) entity;
            if (pc.jdoIsDetached() && pc.jdoGetObjectId() == null) {
                throw new IllegalArgumentException("Detached entity with null id cannot be merged.");
            }
            // Read id from entity
            StateManager sm = om.findStateManager(entity);
            if (sm != null) {
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.