Examples of objectForGlobalID()


Examples of com.webobjects.eocontrol.EOEditingContext.objectForGlobalID()

        EOGlobalID gid;
        if(pk != null && pk.length() > 0) {
          if ("T".equals(type)) {
            byte[] bytes = ERXStringUtilities.hexStringToByteArray(pk);
            gid = EOTemporaryGlobalID._gidForRawBytes(bytes);
            eo = ec.objectForGlobalID(gid);
          }
          else {
            pk = ERXStringUtilities.urlDecode(pk);
            gid = ERXEOControlUtilities.globalIDForString(ec, entityName, pk);
            eo = ec.faultForGlobalID(gid, ec);
View Full Code Here

Examples of com.webobjects.eocontrol.EOSharedEditingContext.objectForGlobalID()

     * @return the shared object registered in the default shared editing context
     */
    public static EOEnterpriseObject sharedObjectWithPrimaryKey(String entityName, Object primaryKey) {
        EOKeyGlobalID gid = EOKeyGlobalID.globalIDWithEntityName(entityName, new Object[] {primaryKey});
        EOSharedEditingContext sharedEditingContext = EOSharedEditingContext.defaultSharedEditingContext();
        EOEnterpriseObject eo = sharedEditingContext.objectForGlobalID(gid);
        return (eo != null) ? eo : EOUtilities.objectWithPrimaryKeyValue(sharedEditingContext,
                                                     entityName,
                                                     primaryKey);
    }
   
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.