Beispiel #1
1
  /**
   * If the outbound level is BINARY, convert the string field to binary, then pad to the left with
   * the appropriate number of zero bits to reach a number of bits specified by the bitLength
   * attribute of the TDT definition file.
   */
  private void binaryPadding(Map<String, String> extraparams, Field tdtfield) {
    String fieldname = tdtfield.getName();
    int reqbitlength = tdtfield.getBitLength();
    String value;

    String binaryValue = fieldToBinary(tdtfield, extraparams);
    if (binaryValue.length() < reqbitlength) {
      int extraBitLength = reqbitlength - binaryValue.length();

      StringBuilder zeroPaddedBinaryValue = new StringBuilder("");
      for (int i = 0; i < extraBitLength; i++) {
        zeroPaddedBinaryValue.append("0");
      }
      zeroPaddedBinaryValue.append(binaryValue);
      value = zeroPaddedBinaryValue.toString();
    } else {
      if (binaryValue.length() > reqbitlength)
        throw new TDTException(
            "Binary value ["
                + binaryValue
                + "] for field "
                + fieldname
                + " exceeds maximum allowed "
                + reqbitlength
                + " bits.  Decimal value was "
                + extraparams.get(fieldname));

      value = binaryValue;
    }
    extraparams.put(fieldname, value);
  }
 private void initVars(Map vm) {
   variable_PAGE_NUMBER = (JRFillVariable) vm.get("PAGE_NUMBER");
   variable_COLUMN_NUMBER = (JRFillVariable) vm.get("COLUMN_NUMBER");
   variable_REPORT_COUNT = (JRFillVariable) vm.get("REPORT_COUNT");
   variable_PAGE_COUNT = (JRFillVariable) vm.get("PAGE_COUNT");
   variable_COLUMN_COUNT = (JRFillVariable) vm.get("COLUMN_COUNT");
 }
 private void initVars(Map vm) {
   variable_PAGE_NUMBER = (JRFillVariable) vm.get("PAGE_NUMBER");
   variable_COLUMN_NUMBER = (JRFillVariable) vm.get("COLUMN_NUMBER");
   variable_REPORT_COUNT = (JRFillVariable) vm.get("REPORT_COUNT");
   variable_PAGE_COUNT = (JRFillVariable) vm.get("PAGE_COUNT");
   variable_COLUMN_COUNT = (JRFillVariable) vm.get("COLUMN_COUNT");
   variable_jenis_pembayaran_COUNT = (JRFillVariable) vm.get("jenis_pembayaran_COUNT");
   variable_no_pembayaran_COUNT = (JRFillVariable) vm.get("no_pembayaran_COUNT");
   variable_no_ = (JRFillVariable) vm.get("no_");
   variable_total_per_jenis = (JRFillVariable) vm.get("total_per_jenis");
   variable_grand_total = (JRFillVariable) vm.get("grand_total");
 }
 private void initVars(Map vm) {
   variable_PAGE_NUMBER = (JRFillVariable) vm.get("PAGE_NUMBER");
   variable_COLUMN_NUMBER = (JRFillVariable) vm.get("COLUMN_NUMBER");
   variable_REPORT_COUNT = (JRFillVariable) vm.get("REPORT_COUNT");
   variable_PAGE_COUNT = (JRFillVariable) vm.get("PAGE_COUNT");
   variable_COLUMN_COUNT = (JRFillVariable) vm.get("COLUMN_COUNT");
   variable_type_id_COUNT = (JRFillVariable) vm.get("type_id_COUNT");
   variable_sub_balance = (JRFillVariable) vm.get("sub_balance");
   variable_sub_lbalance = (JRFillVariable) vm.get("sub_lbalance");
   variable_tot_balance = (JRFillVariable) vm.get("tot_balance");
   variable_tot_lbalance = (JRFillVariable) vm.get("tot_lbalance");
 }
  public ICFBamDataScopeObj realizeDataScope(ICFBamDataScopeObj Obj) {
    ICFBamDataScopeObj obj = Obj;
    CFBamDataScopePKey pkey = obj.getPKey();
    ICFBamDataScopeObj keepObj = null;
    if (members.containsKey(pkey) && (null != members.get(pkey))) {
      ICFBamDataScopeObj existingObj = members.get(pkey);
      keepObj = existingObj;

      /*
       *	We always rebind the data because if we're being called, some index has
       *	been updated and is refreshing it's data, which may or may not have changed
       */

      // Detach object from alternate and duplicate indexes, leave PKey alone

      if (indexByUNameIdx != null) {
        CFBamDataScopeByUNameIdxKey keyUNameIdx =
            ((ICFBamSchema) schema.getBackingStore()).getFactoryDataScope().newUNameIdxKey();
        keyUNameIdx.setRequiredName(keepObj.getRequiredName());
        indexByUNameIdx.remove(keyUNameIdx);
      }

      keepObj.setBuff(Obj.getBuff());
      // Attach new object to alternate and duplicate indexes -- PKey stay stable

      if (indexByUNameIdx != null) {
        CFBamDataScopeByUNameIdxKey keyUNameIdx =
            ((ICFBamSchema) schema.getBackingStore()).getFactoryDataScope().newUNameIdxKey();
        keyUNameIdx.setRequiredName(keepObj.getRequiredName());
        indexByUNameIdx.put(keyUNameIdx, keepObj);
      }
      if (allDataScope != null) {
        allDataScope.put(keepObj.getPKey(), keepObj);
      }
    } else {
      keepObj = obj;
      keepObj.setIsNew(false);
      // Attach new object to PKey, all, alternate, and duplicate indexes
      members.put(keepObj.getPKey(), keepObj);
      if (allDataScope != null) {
        allDataScope.put(keepObj.getPKey(), keepObj);
      }

      if (indexByUNameIdx != null) {
        CFBamDataScopeByUNameIdxKey keyUNameIdx =
            ((ICFBamSchema) schema.getBackingStore()).getFactoryDataScope().newUNameIdxKey();
        keyUNameIdx.setRequiredName(keepObj.getRequiredName());
        indexByUNameIdx.put(keyUNameIdx, keepObj);
      }
    }
    return (keepObj);
  }
 private void initFields(Map fm) {
   field_saldo_debet = (JRFillField) fm.get("saldo_debet");
   field_neraca_d = (JRFillField) fm.get("neraca_d");
   field_rl_d = (JRFillField) fm.get("rl_d");
   field_acc_no = (JRFillField) fm.get("acc_no");
   field_group_id = (JRFillField) fm.get("group_id");
   field_rl_k = (JRFillField) fm.get("rl_k");
   field_acc_name = (JRFillField) fm.get("acc_name");
   field_neraca_k = (JRFillField) fm.get("neraca_k");
   field_saldo_kredit = (JRFillField) fm.get("saldo_kredit");
   field_penyesuaian_kredit = (JRFillField) fm.get("penyesuaian_kredit");
   field_penyesuaian_debet = (JRFillField) fm.get("penyesuaian_debet");
 }
 public ICFSecuritySecAppObj readSecAppByUJEEMountIdx(
     long ClusterId, String JEEMountName, boolean forceRead) {
   if (indexByUJEEMountIdx == null) {
     indexByUJEEMountIdx = new HashMap<CFSecuritySecAppByUJEEMountIdxKey, ICFSecuritySecAppObj>();
   }
   CFSecuritySecAppByUJEEMountIdxKey key =
       ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey();
   key.setRequiredClusterId(ClusterId);
   key.setRequiredJEEMountName(JEEMountName);
   ICFSecuritySecAppObj obj = null;
   if ((!forceRead) && indexByUJEEMountIdx.containsKey(key)) {
     obj = indexByUJEEMountIdx.get(key);
   } else {
     CFSecuritySecAppBuff buff =
         ((ICFCrmSchema) schema.getBackingStore())
             .getTableSecApp()
             .readDerivedByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName);
     if (buff != null) {
       obj = schema.getSecAppTableObj().newInstance();
       obj.setPKey(((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newPKey());
       obj.setBuff(buff);
       obj = (ICFSecuritySecAppObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByUJEEMountIdx.put(key, null);
     }
   }
   return (obj);
 }
 public ICFCrmMemoObj readMemoByUDescrIdx(
     long TenantId, long ContactId, String Description, boolean forceRead) {
   if (indexByUDescrIdx == null) {
     indexByUDescrIdx = new HashMap<CFCrmMemoByUDescrIdxKey, ICFCrmMemoObj>();
   }
   CFCrmMemoByUDescrIdxKey key =
       ((ICFAccSchema) schema.getBackingStore()).getFactoryMemo().newUDescrIdxKey();
   key.setRequiredTenantId(TenantId);
   key.setRequiredContactId(ContactId);
   key.setRequiredDescription(Description);
   ICFCrmMemoObj obj = null;
   if ((!forceRead) && indexByUDescrIdx.containsKey(key)) {
     obj = indexByUDescrIdx.get(key);
   } else {
     CFCrmMemoBuff buff =
         ((ICFAccSchema) schema.getBackingStore())
             .getTableMemo()
             .readDerivedByUDescrIdx(schema.getAuthorization(), TenantId, ContactId, Description);
     if (buff != null) {
       obj = schema.getMemoTableObj().newInstance();
       obj.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryMemo().newPKey());
       obj.setBuff(buff);
       obj = (ICFCrmMemoObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByUDescrIdx.put(key, null);
     }
   }
   return (obj);
 }
 public ICFInternetDomainObj readDomainByNameIdx(
     long TenantId, long SubDomainOfId, String Name, boolean forceRead) {
   if (indexByNameIdx == null) {
     indexByNameIdx = new HashMap<CFInternetDomainByNameIdxKey, ICFInternetDomainObj>();
   }
   CFInternetDomainByNameIdxKey key =
       ((ICFBamSchema) schema.getBackingStore()).getFactoryDomain().newNameIdxKey();
   key.setRequiredTenantId(TenantId);
   key.setRequiredSubDomainOfId(SubDomainOfId);
   key.setRequiredName(Name);
   ICFInternetDomainObj obj = null;
   if ((!forceRead) && indexByNameIdx.containsKey(key)) {
     obj = indexByNameIdx.get(key);
   } else {
     CFInternetDomainBuff buff =
         ((ICFBamSchema) schema.getBackingStore())
             .getTableDomain()
             .readDerivedByNameIdx(schema.getAuthorization(), TenantId, SubDomainOfId, Name);
     if (buff != null) {
       obj =
           (ICFInternetDomainObj)
               schema.getDomainBaseTableObj().constructByClassCode(buff.getClassCode());
       obj.setPKey(((ICFBamSchema) schema.getBackingStore()).getFactoryDomainBase().newPKey());
       obj.setBuff(buff);
       obj = (ICFInternetDomainObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByNameIdx.put(key, null);
     }
   }
   return (obj);
 }
Beispiel #10
0
 private void postProcessChangeVO(
     ChangeVO change, int windowNo, Map<String, String> context, String[] dataRow, UITab tab) {
   // make an updated context to get the necessary listboxvos
   Map<String, String> contextAfterUpdate = new HashMap<String, String>(context);
   int j = 0;
   for (UIField field : tab.getFields()) {
     contextAfterUpdate.put(field.getColumnName(), dataRow[j]);
     j++;
   }
   // now change rowData to remove password, and reload the changed
   // listboxes
   j = 0;
   for (UIField field : tab.getFields()) {
     // return an empty string for passwords etc
     if (field.isEncryptedField()
         || field.isEncryptedColumn()
         || "Password".equals(field.getColumnName())) change.rowData[j] = "";
     if (FieldType.isClientLookup(field.getAD_Reference_ID()) && field.isDependentValue()) {
       if (change.changedDropDowns == null)
         change.changedDropDowns = new HashMap<String, ArrayList<NamePair>>();
       ArrayList<NamePair> values;
       if (field.getAD_Reference_ID() == DisplayTypeConstants.Search) {
         ArrayList<String> t = new ArrayList<String>(1);
         t.add(context.get(field.getColumnName()));
         values = getLookupValueDirect(field.getAD_Field_ID(), t, true);
       } else values = getLookupData(windowNo, field.getAD_Field_ID(), context, true);
       change.changedDropDowns.put(field.getColumnName(), values);
     }
     j++;
   }
 }
Beispiel #11
0
  /**
   * Save (Insert new) Row of Tab
   *
   * @param windowNo relative window
   * @param AD_Tab_ID tab
   * @param curRow insert after relative row number in results
   * @param context current (relevant) context of new row
   * @return error message or null
   */
  public ChangeVO insertRow(
      int windowNo, int AD_Tab_ID, int queryResultID, int curRow, Map<String, String> context) {
    if (context == null || context.size() == 0) return new ChangeVO(true, "No Context");
    UITab tab = getTab(AD_Tab_ID);
    if (tab == null) {
      log.config("Not found AD_Tab_ID=" + AD_Tab_ID);
      return new ChangeVO(true, "@NotFound@ @AD_Tab_ID@=" + AD_Tab_ID);
    }

    log.info("Line Amt:" + context.get("LineNetAmt"));
    CContext ctx = new CContext(m_context.entrySet());
    ctx.addWindow(windowNo, context);
    ChangeVO retValue = tab.saveRow(ctx, windowNo, true);
    if (retValue.hasError()) return retValue;
    // Update Results
    ArrayList<String[]> data = m_results.get(queryResultID);
    if (data == null) retValue.addError("Data Not Found");
    else {
      String[] dataRow = retValue.rowData;
      if (curRow >= data.size()) data.add(dataRow);
      else data.add(curRow, dataRow);
      retValue.trxInfo = GridTab.getTrxInfo(tab.getTableName(), ctx, windowNo, tab.getTabNo());
    }
    return retValue;
  } // insertRow
 public ICFSecurityISOCountryObj readISOCountryByNameIdx(String Name, boolean forceRead) {
   if (indexByNameIdx == null) {
     indexByNameIdx = new HashMap<CFSecurityISOCountryByNameIdxKey, ICFSecurityISOCountryObj>();
   }
   CFSecurityISOCountryByNameIdxKey key =
       ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountry().newNameIdxKey();
   key.setRequiredName(Name);
   ICFSecurityISOCountryObj obj = null;
   if ((!forceRead) && indexByNameIdx.containsKey(key)) {
     obj = indexByNameIdx.get(key);
   } else {
     CFSecurityISOCountryBuff buff =
         ((ICFInternetSchema) schema.getBackingStore())
             .getTableISOCountry()
             .readDerivedByNameIdx(schema.getAuthorization(), Name);
     if (buff != null) {
       obj = schema.getISOCountryTableObj().newInstance();
       obj.setPKey(
           ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountry().newPKey());
       obj.setBuff(buff);
       obj = (ICFSecurityISOCountryObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByNameIdx.put(key, null);
     }
   }
   return (obj);
 }
 public ICFBamClearTopDepObj readClearTopDepByUNameIdx(
     long TenantId, long ContTableId, String Name, boolean forceRead) {
   if (indexByUNameIdx == null) {
     indexByUNameIdx = new HashMap<CFBamClearTopDepByUNameIdxKey, ICFBamClearTopDepObj>();
   }
   CFBamClearTopDepByUNameIdxKey key =
       schema.getBackingStore().getFactoryClearTopDep().newUNameIdxKey();
   key.setRequiredTenantId(TenantId);
   key.setRequiredContTableId(ContTableId);
   key.setRequiredName(Name);
   ICFBamClearTopDepObj obj = null;
   if ((!forceRead) && indexByUNameIdx.containsKey(key)) {
     obj = indexByUNameIdx.get(key);
   } else {
     CFBamClearTopDepBuff buff =
         schema
             .getBackingStore()
             .getTableClearTopDep()
             .readDerivedByUNameIdx(schema.getAuthorization(), TenantId, ContTableId, Name);
     if (buff != null) {
       obj =
           (ICFBamClearTopDepObj)
               schema.getScopeTableObj().constructByClassCode(buff.getClassCode());
       obj.setPKey(schema.getBackingStore().getFactoryScope().newPKey());
       obj.setBuff(buff);
       obj = (ICFBamClearTopDepObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByUNameIdx.put(key, null);
     }
   }
   return (obj);
 }
  public void forgetServiceType(ICFSecurityServiceTypeObj Obj, boolean forgetSubObjects) {
    ICFSecurityServiceTypeObj obj = Obj;
    CFSecurityServiceTypePKey pkey = obj.getPKey();
    if (members.containsKey(pkey)) {
      ICFSecurityServiceTypeObj keepObj = members.get(pkey);
      // Detach object from alternate, duplicate, all and PKey indexes

      if (indexByUDescrIdx != null) {
        CFSecurityServiceTypeByUDescrIdxKey keyUDescrIdx =
            ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey();
        keyUDescrIdx.setRequiredDescription(keepObj.getRequiredDescription());
        indexByUDescrIdx.remove(keyUDescrIdx);
      }

      if (allServiceType != null) {
        allServiceType.remove(keepObj.getPKey());
      }
      members.remove(pkey);
      if (forgetSubObjects) {
        ((ICFSecuritySchemaObj) schema)
            .getServiceTableObj()
            .forgetServiceByTypeIdx(keepObj.getRequiredServiceTypeId());
      }
    }
  }
 public ICFAccTaxObj readTaxByUNameIdx(long TenantId, String Name, boolean forceRead) {
   if (indexByUNameIdx == null) {
     indexByUNameIdx = new HashMap<CFAccTaxByUNameIdxKey, ICFAccTaxObj>();
   }
   CFAccTaxByUNameIdxKey key =
       ((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newUNameIdxKey();
   key.setRequiredTenantId(TenantId);
   key.setRequiredName(Name);
   ICFAccTaxObj obj = null;
   if ((!forceRead) && indexByUNameIdx.containsKey(key)) {
     obj = indexByUNameIdx.get(key);
   } else {
     CFAccTaxBuff buff =
         ((ICFAccSchema) schema.getBackingStore())
             .getTableTax()
             .readDerivedByUNameIdx(schema.getAuthorization(), TenantId, Name);
     if (buff != null) {
       obj = schema.getTaxTableObj().newInstance();
       obj.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newPKey());
       obj.setBuff(buff);
       obj = (ICFAccTaxObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByUNameIdx.put(key, null);
     }
   }
   return (obj);
 }
  public void forgetTax(ICFAccTaxObj Obj, boolean forgetSubObjects) {
    ICFAccTaxObj obj = Obj;
    CFAccTaxPKey pkey = obj.getPKey();
    if (members.containsKey(pkey)) {
      ICFAccTaxObj keepObj = members.get(pkey);
      // Detach object from alternate, duplicate, all and PKey indexes

      if (indexByTenantIdx != null) {
        CFAccTaxByTenantIdxKey keyTenantIdx =
            ((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newTenantIdxKey();
        keyTenantIdx.setRequiredTenantId(keepObj.getRequiredTenantId());
        Map<CFAccTaxPKey, ICFAccTaxObj> mapTenantIdx = indexByTenantIdx.get(keyTenantIdx);
        if (mapTenantIdx != null) {
          mapTenantIdx.remove(keepObj.getPKey());
        }
      }

      if (indexByUNameIdx != null) {
        CFAccTaxByUNameIdxKey keyUNameIdx =
            ((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newUNameIdxKey();
        keyUNameIdx.setRequiredTenantId(keepObj.getRequiredTenantId());
        keyUNameIdx.setRequiredName(keepObj.getRequiredName());
        indexByUNameIdx.remove(keyUNameIdx);
      }

      if (allTax != null) {
        allTax.remove(keepObj.getPKey());
      }
      members.remove(pkey);
      if (forgetSubObjects) {}
    }
  }
 public ICFSecurityServiceTypeObj readServiceTypeByUDescrIdx(
     String Description, boolean forceRead) {
   if (indexByUDescrIdx == null) {
     indexByUDescrIdx =
         new HashMap<CFSecurityServiceTypeByUDescrIdxKey, ICFSecurityServiceTypeObj>();
   }
   CFSecurityServiceTypeByUDescrIdxKey key =
       ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey();
   key.setRequiredDescription(Description);
   ICFSecurityServiceTypeObj obj = null;
   if ((!forceRead) && indexByUDescrIdx.containsKey(key)) {
     obj = indexByUDescrIdx.get(key);
   } else {
     CFSecurityServiceTypeBuff buff =
         ((ICFAccSchema) schema.getBackingStore())
             .getTableServiceType()
             .readDerivedByUDescrIdx(schema.getAuthorization(), Description);
     if (buff != null) {
       obj = schema.getServiceTypeTableObj().newInstance();
       obj.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newPKey());
       obj.setBuff(buff);
       obj = (ICFSecurityServiceTypeObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByUDescrIdx.put(key, null);
     }
   }
   return (obj);
 }
  public void forgetSecDevice(ICFSecuritySecDeviceObj Obj, boolean forgetSubObjects) {
    ICFSecuritySecDeviceObj obj = Obj;
    CFSecuritySecDevicePKey pkey = obj.getPKey();
    if (members.containsKey(pkey)) {
      ICFSecuritySecDeviceObj keepObj = members.get(pkey);
      // Detach object from alternate, duplicate, all and PKey indexes

      if (indexByUserIdx != null) {
        CFSecuritySecDeviceByUserIdxKey keyUserIdx =
            ((ICFSecuritySchema) schema.getBackingStore()).getFactorySecDevice().newUserIdxKey();
        keyUserIdx.setRequiredSecUserId(keepObj.getRequiredSecUserId());
        Map<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj> mapUserIdx =
            indexByUserIdx.get(keyUserIdx);
        if (mapUserIdx != null) {
          mapUserIdx.remove(keepObj.getPKey());
        }
      }

      if (allSecDevice != null) {
        allSecDevice.remove(keepObj.getPKey());
      }
      members.remove(pkey);
      if (forgetSubObjects) {}
    }
  }
 public ICFSecuritySecGroupIncludeObj readSecGroupInclude(
     CFSecuritySecGroupIncludePKey pkey, boolean forceRead) {
   ICFSecuritySecGroupIncludeObj obj = null;
   if ((!forceRead) && members.containsKey(pkey)) {
     obj = members.get(pkey);
   } else {
     CFSecuritySecGroupIncludeBuff readBuff =
         ((ICFInternetSchema) schema.getBackingStore())
             .getTableSecGroupInclude()
             .readDerivedByIdIdx(
                 schema.getAuthorization(),
                 pkey.getRequiredClusterId(),
                 pkey.getRequiredSecGroupIncludeId());
     if (readBuff != null) {
       obj = schema.getSecGroupIncludeTableObj().newInstance();
       obj.setPKey(
           ((ICFInternetSchema) schema.getBackingStore()).getFactorySecGroupInclude().newPKey());
       obj.setBuff(readBuff);
       obj = (ICFSecuritySecGroupIncludeObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       members.put(pkey, null);
     }
   }
   return (obj);
 }
 public ICFSecuritySecGroupIncludeObj readSecGroupIncludeByUIncludeIdx(
     long ClusterId, int SecGroupId, int IncludeGroupId, boolean forceRead) {
   if (indexByUIncludeIdx == null) {
     indexByUIncludeIdx =
         new HashMap<CFSecuritySecGroupIncludeByUIncludeIdxKey, ICFSecuritySecGroupIncludeObj>();
   }
   CFSecuritySecGroupIncludeByUIncludeIdxKey key =
       ((ICFInternetSchema) schema.getBackingStore())
           .getFactorySecGroupInclude()
           .newUIncludeIdxKey();
   key.setRequiredClusterId(ClusterId);
   key.setRequiredSecGroupId(SecGroupId);
   key.setRequiredIncludeGroupId(IncludeGroupId);
   ICFSecuritySecGroupIncludeObj obj = null;
   if ((!forceRead) && indexByUIncludeIdx.containsKey(key)) {
     obj = indexByUIncludeIdx.get(key);
   } else {
     CFSecuritySecGroupIncludeBuff buff =
         ((ICFInternetSchema) schema.getBackingStore())
             .getTableSecGroupInclude()
             .readDerivedByUIncludeIdx(
                 schema.getAuthorization(), ClusterId, SecGroupId, IncludeGroupId);
     if (buff != null) {
       obj = schema.getSecGroupIncludeTableObj().newInstance();
       obj.setPKey(
           ((ICFInternetSchema) schema.getBackingStore()).getFactorySecGroupInclude().newPKey());
       obj.setBuff(buff);
       obj = (ICFSecuritySecGroupIncludeObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByUIncludeIdx.put(key, null);
     }
   }
   return (obj);
 }
 public ICFSecurityTSecGroupMemberObj readTSecGroupMemberByUUserIdx(
     long TenantId, int TSecGroupId, UUID SecUserId, boolean forceRead) {
   if (indexByUUserIdx == null) {
     indexByUUserIdx =
         new HashMap<CFSecurityTSecGroupMemberByUUserIdxKey, ICFSecurityTSecGroupMemberObj>();
   }
   CFSecurityTSecGroupMemberByUUserIdxKey key =
       ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUUserIdxKey();
   key.setRequiredTenantId(TenantId);
   key.setRequiredTSecGroupId(TSecGroupId);
   key.setRequiredSecUserId(SecUserId);
   ICFSecurityTSecGroupMemberObj obj = null;
   if ((!forceRead) && indexByUUserIdx.containsKey(key)) {
     obj = indexByUUserIdx.get(key);
   } else {
     CFSecurityTSecGroupMemberBuff buff =
         ((ICFCrmSchema) schema.getBackingStore())
             .getTableTSecGroupMember()
             .readDerivedByUUserIdx(schema.getAuthorization(), TenantId, TSecGroupId, SecUserId);
     if (buff != null) {
       obj = schema.getTSecGroupMemberTableObj().newInstance();
       obj.setPKey(
           ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey());
       obj.setBuff(buff);
       obj = (ICFSecurityTSecGroupMemberObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByUUserIdx.put(key, null);
     }
   }
   return (obj);
 }
 public void deleteSecGroupIncludeByUIncludeIdx(
     long ClusterId, int SecGroupId, int IncludeGroupId) {
   if (indexByUIncludeIdx == null) {
     indexByUIncludeIdx =
         new HashMap<CFSecuritySecGroupIncludeByUIncludeIdxKey, ICFSecuritySecGroupIncludeObj>();
   }
   CFSecuritySecGroupIncludeByUIncludeIdxKey key =
       ((ICFInternetSchema) schema.getBackingStore())
           .getFactorySecGroupInclude()
           .newUIncludeIdxKey();
   key.setRequiredClusterId(ClusterId);
   key.setRequiredSecGroupId(SecGroupId);
   key.setRequiredIncludeGroupId(IncludeGroupId);
   ICFSecuritySecGroupIncludeObj obj = null;
   if (indexByUIncludeIdx.containsKey(key)) {
     obj = indexByUIncludeIdx.get(key);
     ((ICFInternetSchema) schema.getBackingStore())
         .getTableSecGroupInclude()
         .deleteSecGroupIncludeByUIncludeIdx(
             schema.getAuthorization(), ClusterId, SecGroupId, IncludeGroupId);
     obj.forget(true);
   } else {
     ((ICFInternetSchema) schema.getBackingStore())
         .getTableSecGroupInclude()
         .deleteSecGroupIncludeByUIncludeIdx(
             schema.getAuthorization(), ClusterId, SecGroupId, IncludeGroupId);
   }
 }
 public ICFSecurityTSecGroupMemberObj readTSecGroupMember(
     CFSecurityTSecGroupMemberPKey pkey, boolean forceRead) {
   ICFSecurityTSecGroupMemberObj obj = null;
   if ((!forceRead) && members.containsKey(pkey)) {
     obj = members.get(pkey);
   } else {
     CFSecurityTSecGroupMemberBuff readBuff =
         ((ICFCrmSchema) schema.getBackingStore())
             .getTableTSecGroupMember()
             .readDerivedByIdIdx(
                 schema.getAuthorization(),
                 pkey.getRequiredTenantId(),
                 pkey.getRequiredTSecGroupMemberId());
     if (readBuff != null) {
       obj = schema.getTSecGroupMemberTableObj().newInstance();
       obj.setPKey(
           ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey());
       obj.setBuff(readBuff);
       obj = (ICFSecurityTSecGroupMemberObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       members.put(pkey, null);
     }
   }
   return (obj);
 }
 public void deleteTSecGroupMemberByUUserIdx(long TenantId, int TSecGroupId, UUID SecUserId) {
   if (indexByUUserIdx == null) {
     indexByUUserIdx =
         new HashMap<CFSecurityTSecGroupMemberByUUserIdxKey, ICFSecurityTSecGroupMemberObj>();
   }
   CFSecurityTSecGroupMemberByUUserIdxKey key =
       ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUUserIdxKey();
   key.setRequiredTenantId(TenantId);
   key.setRequiredTSecGroupId(TSecGroupId);
   key.setRequiredSecUserId(SecUserId);
   ICFSecurityTSecGroupMemberObj obj = null;
   if (indexByUUserIdx.containsKey(key)) {
     obj = indexByUUserIdx.get(key);
     ((ICFCrmSchema) schema.getBackingStore())
         .getTableTSecGroupMember()
         .deleteTSecGroupMemberByUUserIdx(
             schema.getAuthorization(), TenantId, TSecGroupId, SecUserId);
     obj.forget(true);
   } else {
     ((ICFCrmSchema) schema.getBackingStore())
         .getTableTSecGroupMember()
         .deleteTSecGroupMemberByUUserIdx(
             schema.getAuthorization(), TenantId, TSecGroupId, SecUserId);
   }
 }
 public ICFSecurityISOCountryCurrencyObj readISOCountryCurrency(
     CFSecurityISOCountryCurrencyPKey pkey, boolean forceRead) {
   ICFSecurityISOCountryCurrencyObj obj = null;
   if ((!forceRead) && members.containsKey(pkey)) {
     obj = members.get(pkey);
   } else {
     CFSecurityISOCountryCurrencyBuff readBuff =
         ((ICFInternetSchema) schema.getBackingStore())
             .getTableISOCountryCurrency()
             .readDerivedByIdIdx(
                 schema.getAuthorization(),
                 pkey.getRequiredISOCountryId(),
                 pkey.getRequiredISOCurrencyId());
     if (readBuff != null) {
       obj = schema.getISOCountryCurrencyTableObj().newInstance();
       obj.setPKey(
           ((ICFInternetSchema) schema.getBackingStore())
               .getFactoryISOCountryCurrency()
               .newPKey());
       obj.setBuff(readBuff);
       obj = (ICFSecurityISOCountryCurrencyObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       members.put(pkey, null);
     }
   }
   return (obj);
 }
  /* (non-Javadoc)
   * @see com.tsagate.puridiom.process.ITask#executeTask(java.lang.Object)
   */
  public Object executeTask(Object object) throws Exception {

    Map incomingRequest = (Map) object;
    DBSession dbs = (DBSession) incomingRequest.get("dbsession");

    String queryString =
        "from HistoryLog as hst where hst.icHeaderHistory = ? and (hst.doctype like '%H' or hst.doctype = 'REQ') order by hst.icHistory ASC";

    String icHeaderHistory = (String) incomingRequest.get("HistoryLog_icHeaderHistory");
    BigDecimal bdHeaderHistory = new BigDecimal(icHeaderHistory);

    List result =
        dbs.query(queryString, new Object[] {bdHeaderHistory}, new Type[] {Hibernate.BIG_DECIMAL});

    this.setStatus(dbs.getStatus());
    return result;
  }
  public void forgetSecGroupInclude(ICFGenKbSecGroupIncludeObj Obj, boolean forgetSubObjects) {
    ICFGenKbSecGroupIncludeObj obj = Obj;
    CFGenKbSecGroupIncludePKey pkey = obj.getPKey();
    if (members.containsKey(pkey)) {
      ICFGenKbSecGroupIncludeObj keepObj = members.get(pkey);
      // Detach object from alternate, duplicate, all and PKey indexes

      if (indexByClusterIdx != null) {
        CFGenKbSecGroupIncludeByClusterIdxKey keyClusterIdx =
            schema.getBackingStore().getFactorySecGroupInclude().newClusterIdxKey();
        keyClusterIdx.setRequiredClusterId(keepObj.getRequiredClusterId());
        Map<CFGenKbSecGroupIncludePKey, ICFGenKbSecGroupIncludeObj> mapClusterIdx =
            indexByClusterIdx.get(keyClusterIdx);
        if (mapClusterIdx != null) {
          mapClusterIdx.remove(keepObj.getPKey());
        }
      }

      if (indexByGroupIdx != null) {
        CFGenKbSecGroupIncludeByGroupIdxKey keyGroupIdx =
            schema.getBackingStore().getFactorySecGroupInclude().newGroupIdxKey();
        keyGroupIdx.setRequiredClusterId(keepObj.getRequiredClusterId());
        keyGroupIdx.setRequiredSecGroupId(keepObj.getRequiredSecGroupId());
        Map<CFGenKbSecGroupIncludePKey, ICFGenKbSecGroupIncludeObj> mapGroupIdx =
            indexByGroupIdx.get(keyGroupIdx);
        if (mapGroupIdx != null) {
          mapGroupIdx.remove(keepObj.getPKey());
        }
      }

      if (indexByIncludeIdx != null) {
        CFGenKbSecGroupIncludeByIncludeIdxKey keyIncludeIdx =
            schema.getBackingStore().getFactorySecGroupInclude().newIncludeIdxKey();
        keyIncludeIdx.setRequiredClusterId(keepObj.getRequiredClusterId());
        keyIncludeIdx.setRequiredIncludeGroupId(keepObj.getRequiredIncludeGroupId());
        Map<CFGenKbSecGroupIncludePKey, ICFGenKbSecGroupIncludeObj> mapIncludeIdx =
            indexByIncludeIdx.get(keyIncludeIdx);
        if (mapIncludeIdx != null) {
          mapIncludeIdx.remove(keepObj.getPKey());
        }
      }

      if (indexByUIncludeIdx != null) {
        CFGenKbSecGroupIncludeByUIncludeIdxKey keyUIncludeIdx =
            schema.getBackingStore().getFactorySecGroupInclude().newUIncludeIdxKey();
        keyUIncludeIdx.setRequiredClusterId(keepObj.getRequiredClusterId());
        keyUIncludeIdx.setRequiredSecGroupId(keepObj.getRequiredSecGroupId());
        keyUIncludeIdx.setRequiredIncludeGroupId(keepObj.getRequiredIncludeGroupId());
        indexByUIncludeIdx.remove(keyUIncludeIdx);
      }

      if (allSecGroupInclude != null) {
        allSecGroupInclude.remove(keepObj.getPKey());
      }
      members.remove(pkey);
      if (forgetSubObjects) {}
    }
  }
 private void initVars(Map vm) {
   variable_PAGE_NUMBER = (JRFillVariable) vm.get("PAGE_NUMBER");
   variable_COLUMN_NUMBER = (JRFillVariable) vm.get("COLUMN_NUMBER");
   variable_REPORT_COUNT = (JRFillVariable) vm.get("REPORT_COUNT");
   variable_PAGE_COUNT = (JRFillVariable) vm.get("PAGE_COUNT");
   variable_COLUMN_COUNT = (JRFillVariable) vm.get("COLUMN_COUNT");
   variable_retirado = (JRFillVariable) vm.get("retirado");
   variable_mo = (JRFillVariable) vm.get("mo");
   variable_dire = (JRFillVariable) vm.get("dire");
 }
 private void initFields(Map fm) {
   field_tgl_berangkat = (JRFillField) fm.get("tgl_berangkat");
   field_jml_klem = (JRFillField) fm.get("jml_klem");
   field_sisa = (JRFillField) fm.get("sisa");
   field_kapal = (JRFillField) fm.get("kapal");
   field_total_nota = (JRFillField) fm.get("total_nota");
   field_nama_kota = (JRFillField) fm.get("nama_kota");
   field_kondisi = (JRFillField) fm.get("kondisi");
   field_jml_bayar = (JRFillField) fm.get("jml_bayar");
 }
 private void initVars(Map vm) {
   variable_PAGE_NUMBER = (JRFillVariable) vm.get("PAGE_NUMBER");
   variable_COLUMN_NUMBER = (JRFillVariable) vm.get("COLUMN_NUMBER");
   variable_REPORT_COUNT = (JRFillVariable) vm.get("REPORT_COUNT");
   variable_PAGE_COUNT = (JRFillVariable) vm.get("PAGE_COUNT");
   variable_COLUMN_COUNT = (JRFillVariable) vm.get("COLUMN_COUNT");
   variable_item_COUNT = (JRFillVariable) vm.get("item_COUNT");
   variable_sub_masuk = (JRFillVariable) vm.get("sub_masuk");
   variable_sub_keluar = (JRFillVariable) vm.get("sub_keluar");
 }