Package org.jpox

Examples of org.jpox.ObjectManager$ObjectManagerListener


            // Check for the case of serialised maps, and assign StateManagers to any PC keys/values without
            AbstractMemberMetaData fmd = ownerSM.getClassMetaData().getMetaDataForMember(fieldName);
            if (SCOUtils.mapHasSerialisedKeysAndValues(fmd) &&
                (fmd.getMap().getKeyClassMetaData() != null || fmd.getMap().getValueClassMetaData() != null))
            {
                ObjectManager om = ownerSM.getObjectManager();
                Iterator iter = m.entrySet().iterator();
                while (iter.hasNext())
                {
                    Map.Entry entry = (Map.Entry)iter.next();
                    Object key = entry.getKey();
                    Object value = entry.getValue();
                    if (fmd.getMap().getKeyClassMetaData() != null)
                    {
                        StateManager objSM = om.findStateManager(key);
                        if (objSM == null)
                        {
                            objSM = StateManagerFactory.newStateManagerForEmbedded(om, key, false);
                            objSM.addEmbeddedOwner(ownerSM, fieldNumber);
                        }
                    }
                    if (fmd.getMap().getValueClassMetaData() != null)
                    {
                        StateManager objSM = om.findStateManager(value);
                        if (objSM == null)
                        {
                            objSM = StateManagerFactory.newStateManagerForEmbedded(om, value, false);
                            objSM.addEmbeddedOwner(ownerSM, fieldNumber);
                        }
View Full Code Here


            }
        }

        try
        {
            ObjectManager om = sm.getObjectManager();
            RDBMSManager storeMgr = (RDBMSManager)om.getStoreManager();
            ManagedConnection mconn = storeMgr.getConnection(om);
            SQLController sqlControl = storeMgr.getSQLController();

            try
            {
View Full Code Here

            }
        }

        try
        {
            ObjectManager om = sm.getObjectManager();
            RDBMSManager storeMgr = (RDBMSManager)om.getStoreManager();
            ManagedConnection mconn = storeMgr.getConnection(om);
            SQLController sqlControl = storeMgr.getSQLController();

            try
            {
View Full Code Here

            return false;
        }

        if (element != null && !elementsAreEmbedded && !elementsAreSerialised)
        {
            ObjectManager om = sm.getObjectManager();
            if ((!om.getApiAdapter().isPersistent(element) ||
                 om != ObjectManagerHelper.getObjectManager(element)) && !om.getApiAdapter().isDetached(element))
            {
                return false;
            }
        }
View Full Code Here

        {
            // Element is embedded/serialised so has no id
        }
        else
        {
            ObjectManager om = sm.getObjectManager();
            StateManager elementSM = om.findStateManager(element);
            if (elementSM != null && elementSM.isEmbedded())
            {
                // Element is already with StateManager and is embedded in another field!
                throw new JPOXUserException(LOCALISER.msg("056028",
                    ownerMemberMetaData.getFullFieldName(), element));
View Full Code Here

        }

        String clearStmt = getClearStmt();
        try
        {
            ObjectManager om = ownerSM.getObjectManager();
            ManagedConnection mconn = storeMgr.getConnection(om);
            SQLController sqlControl = storeMgr.getSQLController();
            try
            {
                PreparedStatement ps = sqlControl.getStatementForUpdate(mconn, clearStmt, false);
View Full Code Here

        int numRows;

        String sizeStmt = getSizeStmt();
        try
        {
            ObjectManager om = sm.getObjectManager();
            ManagedConnection mconn = storeMgr.getConnection(om);
            SQLController sqlControl = storeMgr.getSQLController();
            try
            {
                PreparedStatement ps = sqlControl.getStatementForQuery(mconn, sizeStmt);
View Full Code Here

        }

        // Add the required field selections to the statement
        ResultObjectFactory rof = newResultObjectFactory(ownerSM, stmt, false, true);

        ObjectManager om = ownerSM.getObjectManager();
        Transaction tx = om.getTransaction();
        boolean useUpdateLock = ((Boolean)tx.getOptions().get("transaction.serializeReadObjects")).booleanValue();
        String statement = storeMgr.getStatementTextForQuery(stmt, useUpdateLock);

        ListIterator iter;
        try
View Full Code Here

        if (elements == null || elements.size() == 0)
        {
            return;
        }

        ObjectManager om = sm.getObjectManager();
        Iterator iter=elements.iterator();
        int jdbcPosition = 1;
        while (iter.hasNext())
        {
            Object element = iter.next();
View Full Code Here

        else
        {
            currentListSize = size;
        }

        ObjectManager om = sm.getObjectManager();
        try
        {
            ManagedConnection mconn = storeMgr.getConnection(om);
            SQLController sqlControl = storeMgr.getSQLController();
            try
View Full Code Here

TOP

Related Classes of org.jpox.ObjectManager$ObjectManagerListener

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.