@Override public String toDatastoreType(final Password memberValue) { return memberValue != null ? memberValue.getPassword() : null; }
public boolean equals(final Password other) { final String otherPassword = other.getPassword(); if (getPassword() == null && otherPassword == null) { return true; } if (getPassword() == null || otherPassword == null) { return false; } return getPassword().equals(otherPassword); }
public boolean equals(final Password other) { final String otherPassword = other.getPassword(); if (getPassword() == null && otherPassword == null) { return true; } if (getPassword() == null || otherPassword == null) { return false; } return getPassword().equals(otherPassword); }
@Override public String getEditText(final ObjectAdapter object) { return object == null ? "" : password(object).getPassword(); }
@Override protected String doEncode(final Object object) { return password(object).getPassword(); }
@Override protected Object preparedStatementObject(final ObjectAdapter value) { if (value == null) { return null; } final Object o = value.getObject(); if (o instanceof Money) { return ((Money) o).floatValue(); } else if (o instanceof Percentage) { return ((Percentage) o).floatValue(); } else if (o instanceof Password) { return ((Password) o).getPassword(); } else if (o instanceof String) { return o; } else if (o instanceof Boolean) { return o; } else { if (columnType().contains("CHAR")) { final EncodableFacet facet = value.getSpecification().getFacet(EncodableFacet.class); final String encodedString = facet.toEncodedString(value); return encodedString; } else { return o; } } }