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);
    }
  }
Exemplo n.º 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);
  }
Exemplo n.º 3
0
 public String getDecryptSql(String tableAlias) {
   return dbEncryptFunction.getDecryptSql(tableAlias + "." + this.getDbColumn());
 }
Exemplo n.º 4
0
 public String getDecryptSql() {
   return dbEncryptFunction.getDecryptSql(this.getDbColumn());
 }
Exemplo n.º 5
0
 public String getDecryptProperty(String propertyName) {
   return dbEncryptFunction.getDecryptSql(propertyName);
 }