コード例 #1
0
  public void setDbEncryptFunction(
      DbEncryptFunction dbEncryptFunction, DbEncrypt dbEncrypt, int dbLen) {
    this.dbEncryptFunction = dbEncryptFunction;
    this.dbEncrypted = true;
    this.dbBind = dbEncryptFunction.getEncryptBindSql();

    this.dbEncryptedType = isLob() ? Types.BLOB : dbEncrypt.getEncryptDbType();
    if (dbLen > 0) {
      setDbLength(dbLen);
    }
  }
コード例 #2
0
  private String tableAliasIntern(
      BeanDescriptor<?> descriptor, String s, boolean dbEncrypted, String dbColumn) {
    if (descriptor != null) {
      s = StringHelper.replaceString(s, "${ta}.", "${}");
      s = StringHelper.replaceString(s, "${ta}", "${}");

      if (dbEncrypted) {
        s = dbEncryptFunction.getDecryptSql(s);
        String namedParam = ":encryptkey_" + descriptor.getBaseTable() + "___" + dbColumn;
        s = StringHelper.replaceString(s, "?", namedParam);
      }
    }
    return InternString.intern(s);
  }
コード例 #3
0
 public String getDecryptSql(String tableAlias) {
   return dbEncryptFunction.getDecryptSql(tableAlias + "." + this.getDbColumn());
 }
コード例 #4
0
 public String getDecryptSql() {
   return dbEncryptFunction.getDecryptSql(this.getDbColumn());
 }
コード例 #5
0
 public String getDecryptProperty(String propertyName) {
   return dbEncryptFunction.getDecryptSql(propertyName);
 }