*
* @author Roland Haeder
* @version 0.0
- * @since 0.0
*/
public class BaseContact extends BaseFrameworkSystem {
* No instances can be created of this class
*/
protected BaseContact () {
- super();
}
/**
protected final void setBirthday (final String birthday) {
this.birthday = birthday;
}
+
+ /**
+ * Checks if given boolean field is available and set to same value
+ *
+ * @param columnName Column name to check
+ * @param bool Boolean value
+ * @return Whether all conditions are met
+ */
+ public boolean isValueEqual (final String columnName, final boolean bool) {
+ // Trace message
+ this.getLogger().trace(MessageFormat.format("columnName={0},bool={1} - CALLED!", columnName, bool));
+
+ // Convert column name to field name
+ String methodName = this.convertColumnNameToGetterMethod(columnName, true);
+
+ // Debug message
+ this.getLogger().debug(MessageFormat.format("field={0}", methodName));
+
+ // Init class instance
+ boolean value = this.getBooleanField(this, "BaseContact", methodName);
+
+ // Debug message
+ this.getLogger().debug(MessageFormat.format("value={0}", value));
+
+ // Compare it
+ boolean isFound = (bool == value);
+
+ // Trace message
+ this.getLogger().trace("isFound=" + isFound + " - EXIT!");
+
+ // Return result
+ return isFound;
+ }
}