public String toString() {
   String ret =
       "<CFBamClearTopDepByContTblIdx"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredContTableId="
           + "\""
           + Long.toString(getRequiredContTableId())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFDbTestValueByScopeIdx"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredScopeId="
           + "\""
           + Long.toString(getRequiredScopeId())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFDbTestBoolTypeBySchemaIdx"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredSchemaDefId="
           + "\""
           + Long.toString(getRequiredSchemaDefId())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFCrmMemoTagByTagIdx"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredTagId="
           + "\""
           + Long.toString(getRequiredTagId())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFBamScopePKey"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredId="
           + "\""
           + Long.toString(getRequiredId())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFBamTimeColByTableIdx"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredTableId="
           + "\""
           + Long.toString(getRequiredTableId())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFBamPopDepByRelationIdx"
           + " RequiredRelationTenantId="
           + "\""
           + Long.toString(getRequiredRelationTenantId())
           + "\""
           + " RequiredRelationId="
           + "\""
           + Long.toString(getRequiredRelationId())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFFreeSwitchPbxIvrMenuEntryByMenuIdIdx"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredMenuId="
           + "\""
           + Long.toString(getRequiredMenuId())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFCrmContactURLPKey"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredContactURLId="
           + "\""
           + Long.toString(getRequiredContactURLId())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFAsteriskClusterId64Gen"
           + " RequiredId="
           + "\""
           + Long.toString(getRequiredId())
           + "\""
           + ", SliceId=\""
           + Short.toString(getRequiredSliceId())
           + "\""
           + ", NextId=\""
           + Long.toString(nextId)
           + "\"/>";
   return (ret);
 }
  public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFDbTestMssCFBindReqMinMaxValueTestUInt32.expandBody() ";

    if (genContext == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "expandBody", 1, "genContext");
    }

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFDbTestReqMinMaxValueObj) {
      long testUInt32 = ((ICFDbTestReqMinMaxValueObj) genDef).getRequiredTestUInt32();
      ret = Long.toString(testUInt32);
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(
              getClass(),
              "expandBody",
              "genContext.getGenDef()",
              genDef,
              "ICFDbTestReqMinMaxValueObj");
    }

    return (ret);
  }
コード例 #12
0
ファイル: Fraction.java プロジェクト: tony200910041/TinyCalc
 public Fraction(BigDecimal original) {
   super();
   double A, C, D, X, Y, M;
   C = original.doubleValue();
   A = C;
   D = C;
   X = 1;
   Y = 0;
   do {
     M = Y;
     Y = X + Y * Math.round(C);
     X = M;
     if (C != Math.round(C)) {
       C = 1 / (C - Math.round(C));
     }
     M = Math.round(D * Y);
   } while (M != MathUtilities.toFix(D * Y, 10));
   if ((Math.abs(M) > 100000) || (Math.abs(Y) > 100000) || (Math.abs(Y) == 1)) {
     this.numerator = original;
     this.denominator = BigInteger.ONE;
   } else {
     this.numerator =
         BigDecimal.valueOf(Math.round((Math.abs(M) / M) * (Math.abs(Y) / Y) * Math.abs(M)));
     this.denominator = new BigInteger(Long.toString(Math.round(Math.abs(Y))));
   }
 }
  public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFBamMssCFBindUuidGenDispenserId.expandBody() ";

    if (genContext == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "expandBody", 1, "genContext");
    }

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFBamUuidGenObj) {
      Long dispenserId = ((ICFBamUuidGenObj) genDef).getOptionalDispenserId();
      if (dispenserId == null) {
        ret = null;
      } else {
        ret = dispenserId.toString();
      }
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(
              getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFBamUuidGenObj");
    }

    return (ret);
  }
  public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFBamMssCFBindInt64DefMinValue.expandBody() ";

    if (genContext == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "expandBody", 1, "genContext");
    }

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFBamInt64DefObj) {
      Long minValue = ((ICFBamInt64DefObj) genDef).getOptionalMinValue();
      if (minValue == null) {
        ret = null;
      } else {
        ret = minValue.toString();
      }
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(
              getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFBamInt64DefObj");
    }

    return (ret);
  }
  public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFFreeSwitchMssCFBindFSSFProfileAliasFSSFProfileId.expandBody() ";

    if (genContext == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "expandBody", 1, "genContext");
    }

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFFreeSwitchFSSFProfileAliasObj) {
      long fSSFProfileId = ((ICFFreeSwitchFSSFProfileAliasObj) genDef).getRequiredFSSFProfileId();
      ret = Long.toString(fSSFProfileId);
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(
              getClass(),
              "expandBody",
              "genContext.getGenDef()",
              genDef,
              "ICFFreeSwitchFSSFProfileAliasObj");
    }

    return (ret);
  }
  public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFBamMssCFBindPopSubDep1ContPopTopDepId.expandBody() ";

    if (genContext == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "expandBody", 1, "genContext");
    }

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFBamPopSubDep1Obj) {
      long contPopTopDepId = ((ICFBamPopSubDep1Obj) genDef).getRequiredContPopTopDepId();
      ret = Long.toString(contPopTopDepId);
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(
              getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFBamPopSubDep1Obj");
    }

    return (ret);
  }
 public String toString() {
   String ret =
       "<CFFreeSwitchFSSFDialerHPKey"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredFSSFDialerId="
           + "\""
           + Long.toString(getRequiredFSSFDialerId())
           + "\""
           + " RequiredRevision=\""
           + Integer.toString(getRequiredRevision())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFBamValueHPKey"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredId="
           + "\""
           + Long.toString(getRequiredId())
           + "\""
           + " RequiredRevision=\""
           + Integer.toString(getRequiredRevision())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFInternetMajorVersionByNameIdx"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredParentProjectId="
           + "\""
           + Long.toString(getRequiredParentProjectId())
           + "\""
           + " RequiredName="
           + "\""
           + CFInternetSchema.xmlEncodeString(getRequiredName())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFDbTestTableByUNameIdx"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredSchemaDefId="
           + "\""
           + Long.toString(getRequiredSchemaDefId())
           + "\""
           + " RequiredName="
           + "\""
           + CFDbTestSchema.xmlEncodeString(getRequiredName())
           + "\""
           + "/>";
   return (ret);
 }
 public CFSecurityCursor openFeeDetailCursorByFeeIdx(
     CFSecurityAuthorization Authorization, long TenantId, long FeeId) {
   String sql =
       getSqlSelectFeeDetailBuff()
           + "WHERE "
           + "fedt.tenantid = "
           + Long.toString(TenantId)
           + " "
           + "AND "
           + "fedt.feeid = "
           + Long.toString(FeeId)
           + " "
           + "ORDER BY "
           + "fedt.TenantId ASC"
           + ", "
           + "fedt.FeeDetailId ASC";
   CFAccCursor cursor = new CFAccSybaseCursor(Authorization, schema, sql);
   return (cursor);
 }
 public String toString() {
   String ret =
       "<CFAccAccountContactByTenantIdx"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + "/>";
   return (ret);
 }
 public CFSecurityCursor openMemoDataCursorByMemoDataCtcIdx(
     CFSecurityAuthorization Authorization, long TenantId, long ContactId) {
   String sql =
       getSqlSelectMemoDataBuff()
           + " WHERE "
           + "mmod.tenantid = "
           + Long.toString(TenantId)
           + " "
           + "AND "
           + "mmod.contactid = "
           + Long.toString(ContactId)
           + " "
           + "ORDER BY "
           + "mmod.TenantId ASC"
           + ", "
           + "mmod.MemoId ASC";
   CFCrmCursor cursor = new CFCrmMSSqlCursor(Authorization, schema, sql);
   return (cursor);
 }
 public String toString() {
   String ret =
       "<CFSecurityHostNodeByClusterIdx"
           + " RequiredClusterId="
           + "\""
           + Long.toString(getRequiredClusterId())
           + "\""
           + "/>";
   return (ret);
 }
 public CFSecurityCursor openContactTagCursorByTagIdx(
     CFSecurityAuthorization Authorization, long TenantId, long TagId) {
   String sql =
       getSqlSelectContactTagBuff()
           + " WHERE "
           + "cttg.tenantid = "
           + Long.toString(TenantId)
           + " "
           + "AND "
           + "cttg.tagid = "
           + Long.toString(TagId)
           + " "
           + "ORDER BY "
           + "cttg.TenantId ASC"
           + ", "
           + "cttg.ContactId ASC"
           + ", "
           + "cttg.TagId ASC";
   CFCrmCursor cursor = new CFCrmMSSqlCursor(Authorization, schema, sql);
   return (cursor);
 }
 public CFSecurityCursor openTopDomainCursorByTldIdx(
     CFSecurityAuthorization Authorization, long TenantId, long TldId) {
   String sql =
       getSqlSelectTopDomainBuff()
           + "WHERE "
           + "tdom.TenantId = "
           + Long.toString(TenantId)
           + " "
           + "AND "
           + "tdom.TldId = "
           + Long.toString(TldId)
           + " "
           + "AND "
           + "bdom.ClassCode = 'TDOM'"
           + "ORDER BY "
           + "tdom.TenantId ASC"
           + ", "
           + "tdom.Id ASC";
   CFDbTestCursor cursor = new CFDbTestDb2LUWCursor(Authorization, schema, sql);
   return (cursor);
 }
 public CFSecurityCursor openTenantCursorByClusterIdx(
     CFSecurityAuthorization Authorization, long ClusterId) {
   String sql =
       getSqlSelectTenantBuff()
           + "WHERE "
           + "tent.clusterid = "
           + Long.toString(ClusterId)
           + " "
           + "ORDER BY "
           + "tent.Id ASC";
   CFAsteriskCursor cursor = new CFAsteriskSybaseCursor(Authorization, schema, sql);
   return (cursor);
 }
 public CFSecurityCursor openSysClusterCursorByClusterIdx(
     CFSecurityAuthorization Authorization, long ClusterId) {
   String sql =
       getSqlSelectSysClusterBuff()
           + "WHERE "
           + "sysc.sys_clus_id = "
           + Long.toString(ClusterId)
           + " "
           + "ORDER BY "
           + "sysc.sgltn_id ASC";
   CFAsteriskCursor cursor = new CFAsteriskDb2LUWCursor(Authorization, schema, sql);
   return (cursor);
 }
 public String toString() {
   String ret =
       "<CFSecurityTenantByUNameIdx"
           + " RequiredClusterId="
           + "\""
           + Long.toString(getRequiredClusterId())
           + "\""
           + " RequiredTenantName="
           + "\""
           + CFSecuritySchema.xmlEncodeString(getRequiredTenantName())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFDbTestOptFullRangeByUDescrIdx"
           + " RequiredTenantId="
           + "\""
           + Long.toString(getRequiredTenantId())
           + "\""
           + " RequiredDescription="
           + "\""
           + CFDbTestSchema.xmlEncodeString(getRequiredDescription())
           + "\""
           + "/>";
   return (ret);
 }