I've just released the 'Domain Value' framework for easily creation of Java domain value classes.
github: https://github.com/qoomon/java-domain-value
Domain-Values
Maven Dependency
<dependency>
<groupId>com.qoomon</groupId>
<artifactId>domainvalue</artifactId>
<version>2.0.0</version>
</dependency>
Example: BankAccountNumber
public class BankAccountNumber extends LongDV {
protected BankAccountNumber(Long value) {
super(value);
}
public static BankAccountNumber of(Long value) {
assert isValid(value) : isNotValidText(value, Id.class);
return new Id(value);
}
public static boolean isValid(Long value) {
return LongDV.isValid(value)
&& value > 0;
}
public static BankAccountNumber of(String stringValue) {
Long value = Long_of(stringValue);
return of(value);
}
public static boolean isValid(String stringValue) {
if(Long_isValid(stringValue)){
Long value = Long_of(stringValue);
return isValid(value);
}
return false;
}
}
Grosvenor Hotel Casino & Spa: Luxury Hotel in Israel - Air
ReplyDeleteGrosvenor Hotel Casino where to order air jordan 18 retro toro mens sneakers & Spa is how to buy air jordan 18 retro men blue situated on the top level of Israel's renowned air jordan 18 retro red suede online store Gold Coast and features over 2,000 where to buy air jordan 18 retro guest rooms. Located in 사설토토 추천 샤오미 the centre of