Package org.ofbiz.entity

Examples of org.ofbiz.entity.GenericPK


            Debug.logVerbose("[getReadOnlyValue] entityFindMap           -> " +
                    entityFindMap.toString(), module);

            // Find the entity by its primary key.
            ModelEntity entityEntity = delegator.getModelEntity(uiDisplayObject.getAttribEntity());
            GenericPK entityPk = new GenericPK(entityEntity, entityFindMap);

            try {
                gv = delegator.findByPrimaryKeyCache(entityPk);
            } catch (GenericEntityException e) {
                Debug.logError(
View Full Code Here


        String mainEntityName = entityGV.getEntityName();
        String relatedEntityName = "Team";

        // Finding related Team records. Need special processing because the relationship cannot be
        // defined in the sfa-config.xml file.
        GenericPK entityPK = null;
        String entityKeyString = null;

        List relatedGVL = null;

        try {
View Full Code Here

      GenericValue contactGV = dataMatrix.getCurrentBuffer().getGenericValue(0,0);
      String contactId = contactGV.getString("contactId");
      Timestamp now = new Timestamp(Calendar.getInstance().getTime().getTime());
           
      // copy the standard process to this company, so that it can be modified
      GenericValue dealStageType = delegator.findByPrimaryKey(new GenericPK( delegator.getModelEntity("DealStageType"), UtilMisc.toMap("dealStageTypeId","1")));
     
      String origStageTypeId = dealStageType.getString("dealStageTypeId");
      String newStageTypeId = GenericReplicator.getNextSeqId("DealStageType", delegator);
      dealStageType.set("dealStageTypeId", newStageTypeId);
      dealStageType.set("accountId", userInfo.getAccountId());
View Full Code Here

        String mainEntityName = entityGV.getEntityName();
        String relatedEntityName = "Address";

        // Find related Address records. Need special processing because
        // the relationship cannot be defined in the sfa-config.xml file.
        GenericPK entityPK = null;
        String entityKeyString = null;

        String entityName = entityGV.getEntityName();
        List relatedGVL = null;
View Full Code Here

        String mainEntityName = entityGV.getEntityName();
        String relatedEntityName = "EntityAccess";

        // Find related EntityAccess records. Need special processing because
        // the relationship cannot be defined in the sfa-config.xml file.
        GenericPK entityPK = null;
        String entityKeyString = null;

        String entityName = entityGV.getEntityName();
        List relatedGVL = null;
View Full Code Here

            ModelEntity uiAttributeEntity = delegator.getModelEntity(
                    "UiAttribute");
            HashMap uiAttributeFindMap = new HashMap();
            uiAttributeFindMap.put("attributeId", searchAttributeId);

            GenericPK uiAttributePk = new GenericPK(uiAttributeEntity,
                    uiAttributeFindMap);
            GenericValue uiAttributeGenericValue = delegator.findByPrimaryKeyCache(uiAttributePk);

            if (uiAttributeGenericValue == null) {
                throw new GenericEntityException(
                    "No Ui Attribute was found for ui_attribute.attribute_id=" +
                    searchAttributeId);
            }

            String searchAttribName = uiAttributeGenericValue.getString(
                    "attributeName");
            String searchEntityId = uiAttributeGenericValue.getString(
                    "entityId");

            ModelEntity uiEntityEntity = delegator.getModelEntity("UiEntity");
            HashMap uiEntityFindMap = new HashMap();
            uiEntityFindMap.put("entityId", searchEntityId);

            GenericPK uiEntityPk = new GenericPK(uiEntityEntity, uiEntityFindMap);
            GenericValue uiEntityGenericValue = delegator.findByPrimaryKeyCache(uiEntityPk);
            String searchEntityName = uiEntityGenericValue.getString(
                    "entityName");

            String searchAttribValue = nameToSearchParam.replace('*', '%') +
View Full Code Here

        Debug.logVerbose("[getPreference] preferenceName: " + preferenceName, module);
        Debug.logVerbose("[getPreference] defaultValue: " + defaultValue, module);
        Debug.logVerbose("[getPreference] delegator.getDelegatorName(): " +
                delegator.getDelegatorName(), module);

        GenericPK partyAttributePK = delegator.makePK("PartyAttribute",
                UtilMisc.toMap("partyId", partyId, "attrName", preferenceName));
        String attrValue = (String) partyAttributeCache.get(partyAttributePK);

        if (attrValue == null) {
            try {
View Full Code Here

                return new ArrayList();
            }

            // Get the account ID for this activity.
            String activityId = (String) filterValues.get("activityId");
            GenericPK activityPK = new GenericPK(delegator.getModelEntity(
                        "Activity"));
            activityPK.set("activityId", activityId);

            GenericValue activityGV = null;

            try {
                activityGV = delegator.findByPrimaryKey(activityPK);
View Full Code Here

    public ArrayList getAssignmentRules(String partyId) {
        Debug.logVerbose("[getAssignmentRules] partyId: " + partyId, module);
        Debug.logVerbose("[getAssignmentRules] delegator.getDelegatorName(): " +
                delegator.getDelegatorName(), module);

        GenericPK partyPK = delegator.makePK("Party",
                UtilMisc.toMap("partyId", partyId));
        ArrayList leadRules = (ArrayList) leadAssignemtRuleCache.get(partyPK);

        if (leadRules == null) {
            try {
View Full Code Here

        ModelEntity uiDisplayObjectEntity = delegator.getModelEntity(
                "UiDisplayObject");
        HashMap findMap = new HashMap();
        findMap.put("displayObjectId", displayObjectId);

        GenericPK uiDisplayObjectPK = new GenericPK(uiDisplayObjectEntity,
                findMap);
        GenericValue uiDisplayObjectGV = delegator.findByPrimaryKey(uiDisplayObjectPK);

        if (uiDisplayObjectGV == null) {
            throw new GenericEntityException(
View Full Code Here

TOP

Related Classes of org.ofbiz.entity.GenericPK

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.