@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } final TagModelDao that = (TagModelDao) o; return isSame(that); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (accountId != null ? accountId.hashCode() : 0); result = 31 * result + (email != null ? email.hashCode() : 0); result = 31 * result + (isActive ? 1 : 0); return result; }
@Override public EntityHistoryModelDao<M, E> map(final int index, final ResultSet r, final StatementContext ctx) throws SQLException { final UUID id = getUUID(r, "id"); final long targetRecordId = r.getLong("target_record_id"); final String changeType = r.getString("change_type"); final DateTime createdDate = getDateTime(r, "created_date"); // preserve history record id, as it is needed to reference it with audit log final long historyRecordId = r.getLong("history_record_id"); final M entityModelDao = entityMapper.map(index, r, ctx); // Hack -- remove the id as it is the history id, not the entity id ((EntityModelDaoBase) entityModelDao).setId(null); // Hack -- similarly, populate the right record_id ((EntityModelDaoBase) entityModelDao).setRecordId(targetRecordId); // Hack -- account is special if (entityModelDao.getAccountRecordId() == null) { ((EntityModelDaoBase) entityModelDao).setAccountRecordId(targetRecordId); } return new EntityHistoryModelDao(id, entityModelDao, targetRecordId, ChangeType.valueOf(changeType), historyRecordId, createdDate); } }
@Override public void setRecordId(final Long recordId) { super.setRecordId(recordId); // Invoked by the jDBI mapper when retrieving the record: while there is no account_record_id column, // populate the field manually for EntitySqlDaoWrapperInvocationHandler#populateCaches to populate the // ACCOUNT_RECORD_ID cache setAccountRecordId(recordId); }
@Override public void setRecordId(final Long recordId) { super.setRecordId(recordId); // Invoked by the jDBI mapper when retrieving the record: while there is no account_record_id column, // populate the field manually for EntitySqlDaoWrapperInvocationHandler#populateCaches to populate the // ACCOUNT_RECORD_ID cache setAccountRecordId(recordId); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (tenantKey != null ? tenantKey.hashCode() : 0); result = 31 * result + (tenantValue != null ? tenantValue.hashCode() : 0); result = 31 * result + (isActive != null ? isActive.hashCode() : 0); return result; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } final EntityAudit that = (EntityAudit) o; if (changeType != that.changeType) { return false; } if (tableName != that.tableName) { return false; } if (targetRecordId != null ? !targetRecordId.equals(that.targetRecordId) : that.targetRecordId != null) { return false; } return true; }
@Override public EntityHistoryModelDao<M, E> map(final int index, final ResultSet r, final StatementContext ctx) throws SQLException { final UUID id = getUUID(r, "id"); final long targetRecordId = r.getLong("target_record_id"); final String changeType = r.getString("change_type"); final DateTime createdDate = getDateTime(r, "created_date"); // preserve history record id, as it is needed to reference it with audit log final long historyRecordId = r.getLong("history_record_id"); final M entityModelDao = entityMapper.map(index, r, ctx); // Hack -- remove the id as it is the history id, not the entity id ((EntityModelDaoBase) entityModelDao).setId(null); // Hack -- similarly, populate the right record_id ((EntityModelDaoBase) entityModelDao).setRecordId(targetRecordId); // Hack -- account is special if (entityModelDao.getAccountRecordId() == null) { ((EntityModelDaoBase) entityModelDao).setAccountRecordId(targetRecordId); } return new EntityHistoryModelDao(id, entityModelDao, targetRecordId, ChangeType.valueOf(changeType), historyRecordId, createdDate); } }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (description != null ? description.hashCode() : 0); result = 31 * result + (isActive != null ? isActive.hashCode() : 0); result = 31 * result + (applicableObjectTypes != null ? applicableObjectTypes.hashCode() : 0); return result; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } final AccountEmailModelDao that = (AccountEmailModelDao) o; if (isActive != that.isActive) { return false; } if (accountId != null ? !accountId.equals(that.accountId) : that.accountId != null) { return false; } if (email != null ? !email.equals(that.email) : that.email != null) { return false; } return true; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (externalKey != null ? externalKey.hashCode() : 0); result = 31 * result + (apiKey != null ? apiKey.hashCode() : 0); result = 31 * result + (apiSecret != null ? apiSecret.hashCode() : 0); result = 31 * result + (apiSalt != null ? apiSalt.hashCode() : 0); return result; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof TenantBroadcastModelDao)) { return false; } if (!super.equals(o)) { return false; } final TenantBroadcastModelDao that = (TenantBroadcastModelDao) o; if (targetTableName != that.targetTableName) { return false; } if (targetRecordId != null ? !targetRecordId.equals(that.targetRecordId) : that.targetRecordId != null) { return false; } if (type != null ? !type.equals(that.type) : that.type != null) { return false; } if (userToken != null ? !userToken.equals(that.userToken) : that.userToken != null) { return false; } return true; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (type != null ? type.hashCode() : 0); result = 31 * result + (targetRecordId != null ? targetRecordId.hashCode() : 0); result = 31 * result + (targetTableName != null ? targetTableName.hashCode() : 0); result = 31 * result + (userToken != null ? userToken.hashCode() : 0); return result; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } final TenantKVModelDao that = (TenantKVModelDao) o; if (isActive != null ? !isActive.equals(that.isActive) : that.isActive != null) { return false; } if (tenantKey != null ? !tenantKey.equals(that.tenantKey) : that.tenantKey != null) { return false; } if (tenantValue != null ? !tenantValue.equals(that.tenantValue) : that.tenantValue != null) { return false; } return true; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (tagDefinitionId != null ? tagDefinitionId.hashCode() : 0); result = 31 * result + (objectId != null ? objectId.hashCode() : 0); result = 31 * result + (objectType != null ? objectType.hashCode() : 0); result = 31 * result + (isActive != null ? isActive.hashCode() : 0); return result; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } final TenantModelDao that = (TenantModelDao) o; if (apiKey != null ? !apiKey.equals(that.apiKey) : that.apiKey != null) { return false; } if (apiSalt != null ? !apiSalt.equals(that.apiSalt) : that.apiSalt != null) { return false; } if (apiSecret != null ? !apiSecret.equals(that.apiSecret) : that.apiSecret != null) { return false; } if (externalKey != null ? !externalKey.equals(that.externalKey) : that.externalKey != null) { return false; } return true; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (fieldName != null ? fieldName.hashCode() : 0); result = 31 * result + (fieldValue != null ? fieldValue.hashCode() : 0); result = 31 * result + (objectId != null ? objectId.hashCode() : 0); result = 31 * result + (objectType != null ? objectType.hashCode() : 0); result = 31 * result + (isActive != null ? isActive.hashCode() : 0); return result; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } final TagDefinitionModelDao that = (TagDefinitionModelDao) o; if (description != null ? !description.equals(that.description) : that.description != null) { return false; } if (isActive != null ? !isActive.equals(that.isActive) : that.isActive != null) { return false; } if (applicableObjectTypes != null ? !applicableObjectTypes.equals(that.applicableObjectTypes) : that.applicableObjectTypes != null) { return false; } if (name != null ? !name.equals(that.name) : that.name != null) { return false; } return true; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (externalKey != null ? externalKey.hashCode() : 0); result = 31 * result + (accountId != null ? accountId.hashCode() : 0); result = 31 * result + (lastSysUpdateDate != null ? lastSysUpdateDate.hashCode() : 0); result = 31 * result + (originalCreatedDate != null ? originalCreatedDate.hashCode() : 0); return result; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } final CustomFieldModelDao that = (CustomFieldModelDao) o; if (fieldName != null ? !fieldName.equals(that.fieldName) : that.fieldName != null) { return false; } if (fieldValue != null ? !fieldValue.equals(that.fieldValue) : that.fieldValue != null) { return false; } if (objectId != null ? !objectId.equals(that.objectId) : that.objectId != null) { return false; } if (objectType != that.objectType) { return false; } if (isActive != null ? !isActive.equals(that.isActive) : that.isActive != null) { return false; } return true; }