예제 #1
0
  /**
   * Set Environment key to value
   *
   * @param key variable name ('#' will be converted to '_')
   * @param stringValue try to convert to Object
   */
  public void setEnvironment(String key, String stringValue) {
    if (key == null || key.length() == 0) return;
    //	log.fine( "Scriptlet.setEnvironment " + key, stringValue);
    if (stringValue == null) {
      m_ctx.remove(key);
      return;
    }

    //  Boolean
    if (stringValue.equals("Y")) {
      m_ctx.put(convertKey(key), Boolean.valueOf(true));
      return;
    }
    if (stringValue.equals("N")) {
      m_ctx.put(convertKey(key), Boolean.valueOf(false));
      return;
    }

    //  Timestamp
    Timestamp timeValue = null;
    try {
      timeValue = Timestamp.valueOf(stringValue);
      m_ctx.put(convertKey(key), timeValue);
      return;
    } catch (Exception e) {
    }

    //  Numeric
    Integer intValue = null;
    try {
      intValue = Integer.valueOf(stringValue);
    } catch (NumberFormatException e) {
    }
    Double doubleValue = null;
    try {
      doubleValue = Double.valueOf(stringValue);
    } catch (NumberFormatException e) {
    }
    if (doubleValue != null) {
      if (intValue != null) {
        double di = Double.parseDouble(intValue.toString());
        //  the numbers are the same -> integer
        if (Double.compare(di, doubleValue.doubleValue()) == 0) {
          m_ctx.put(convertKey(key), intValue);
          return;
        }
      }
      m_ctx.put(convertKey(key), doubleValue);
      return;
    }
    if (intValue != null) {
      m_ctx.put(convertKey(key), intValue);
      return;
    }
    m_ctx.put(convertKey(key), stringValue);
  } //  SetEnvironment
예제 #2
0
 /**
  * Set Read Only.
  *
  * @param IsReadOnly Field is read only
  */
 public void setIsReadOnly(boolean IsReadOnly) {
   set_Value("IsReadOnly", Boolean.valueOf(IsReadOnly));
 }
예제 #3
0
 /**
  * Set Encrypted.
  *
  * @param IsEncrypted Display or Storage is encrypted
  */
 public void setIsEncrypted(boolean IsEncrypted) {
   set_Value("IsEncrypted", Boolean.valueOf(IsEncrypted));
 }
예제 #4
0
 /**
  * Set Exclude.
  *
  * @param IsExclude Exclude access to the data - if not selected Include access to the data
  */
 public void setIsExclude(boolean IsExclude) {
   set_Value("IsExclude", Boolean.valueOf(IsExclude));
 }
예제 #5
0
 /**
  * Set Responses Accepted.
  *
  * @param IsRfQResponseAccepted Are Responses to the Request for Quotation accepted
  */
 public void setIsRfQResponseAccepted(boolean IsRfQResponseAccepted) {
   set_Value("IsRfQResponseAccepted", Boolean.valueOf(IsRfQResponseAccepted));
 }
예제 #6
0
 /**
  * Set Processed.
  *
  * @param Processed The document has been processed
  */
 public void setProcessed(boolean Processed) {
   set_ValueNoCheck("Processed", Boolean.valueOf(Processed));
 }
예제 #7
0
 /**
  * Set RfQ Quantity.
  *
  * @param IsRfQQty The quantity is used when generating RfQ Responses
  */
 public void setIsRfQQty(boolean IsRfQQty) {
   set_Value("IsRfQQty", Boolean.valueOf(IsRfQQty));
 }
예제 #8
0
 /**
  * Set Quote All Quantities.
  *
  * @param IsQuoteAllQty Suppliers are requested to provide responses for all quantities
  */
 public void setIsQuoteAllQty(boolean IsQuoteAllQty) {
   set_Value("IsQuoteAllQty", Boolean.valueOf(IsQuoteAllQty));
 }
예제 #9
0
 /**
  * Set Updateable.
  *
  * @param IsUpdateable Determines, if the field can be updated
  */
 public void setIsUpdateable(boolean IsUpdateable) {
   set_Value("IsUpdateable", Boolean.valueOf(IsUpdateable));
 }
예제 #10
0
 /**
  * Set Purchase Quantity.
  *
  * @param IsPurchaseQty This quantity is used in the Purchase Order to the Supplier
  */
 public void setIsPurchaseQty(boolean IsPurchaseQty) {
   set_Value("IsPurchaseQty", Boolean.valueOf(IsPurchaseQty));
 }
예제 #11
0
 /**
  * Set Same Line.
  *
  * @param IsSameLine Displayed on same line as previous field
  */
 public void setIsSameLine(boolean IsSameLine) {
   set_Value("IsSameLine", Boolean.valueOf(IsSameLine));
 }
예제 #12
0
 /**
  * Set Mandatory.
  *
  * @param IsMandatory Data is required in this column
  */
 public void setIsMandatory(boolean IsMandatory) {
   set_Value("IsMandatory", Boolean.valueOf(IsMandatory));
 }
예제 #13
0
 /**
  * Set Heading only.
  *
  * @param IsHeading Field without Column - Only label is displayed
  */
 public void setIsHeading(boolean IsHeading) {
   set_Value("IsHeading", Boolean.valueOf(IsHeading));
 }
예제 #14
0
 /**
  * Set Import Error Message.
  *
  * @param I_ErrorMsg Messages generated from import process
  */
 public void setI_ErrorMsg(boolean I_ErrorMsg) {
   set_Value("I_ErrorMsg", Boolean.valueOf(I_ErrorMsg));
 }
예제 #15
0
 /**
  * Set Valid.
  *
  * @param IsValid Element is valid
  */
 public void setIsValid(boolean IsValid) {
   set_Value("IsValid", Boolean.valueOf(IsValid));
 }
예제 #16
0
 /**
  * Set Invited Vendors Only.
  *
  * @param IsInvitedVendorsOnly Only invited vendors can respond to an RfQ
  */
 public void setIsInvitedVendorsOnly(boolean IsInvitedVendorsOnly) {
   set_Value("IsInvitedVendorsOnly", Boolean.valueOf(IsInvitedVendorsOnly));
 }
예제 #17
0
 /**
  * Set Default.
  *
  * @param IsDefault Default value
  */
 public void setIsDefault(boolean IsDefault) {
   set_Value("IsDefault", Boolean.valueOf(IsDefault));
 }
예제 #18
0
 /**
  * Set Quote Total Amt.
  *
  * @param IsQuoteTotalAmt The response can have just the total amount for the RfQ
  */
 public void setIsQuoteTotalAmt(boolean IsQuoteTotalAmt) {
   set_Value("IsQuoteTotalAmt", Boolean.valueOf(IsQuoteTotalAmt));
 }
예제 #19
0
 /**
  * Set Error.
  *
  * @param IsError An Error that has occurred in the execution
  */
 public void setIsError(boolean IsError) {
   set_ValueNoCheck("IsError", Boolean.valueOf(IsError));
 }
예제 #20
0
 /**
  * Set Self-Service.
  *
  * @param IsSelfService This is a Self-Service entry or this entry can be changed via Self-Service
  */
 public void setIsSelfService(boolean IsSelfService) {
   set_Value("IsSelfService", Boolean.valueOf(IsSelfService));
 }
예제 #21
0
 /**
  * Set Dependent Entities.
  *
  * @param IsDependentEntities Also check access in dependent entities
  */
 public void setIsDependentEntities(boolean IsDependentEntities) {
   set_Value("IsDependentEntities", Boolean.valueOf(IsDependentEntities));
 }
예제 #22
0
 /**
  * Set Process Now.
  *
  * @param Processing Process Now
  */
 public void setProcessing(boolean Processing) {
   set_Value("Processing", Boolean.valueOf(Processing));
 }
예제 #23
0
 /**
  * Set Fully Qualified.
  *
  * @param IsFullyQualified This account is fully qualified
  */
 public void setIsFullyQualified(boolean IsFullyQualified) {
   set_ValueNoCheck("IsFullyQualified", Boolean.valueOf(IsFullyQualified));
 }