Skip to content
Domain Values
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
src
.gitignore
.travis.yml
Jenkinsfile
LICENSE
README.md
pom.xml

README.md

domain-value

Build Status

Known Vulnerabilities

Maven Central

Maven Dependency

<dependency>
    <groupId>com.qoomon</groupId>
    <artifactId>domainvalue</artifactId>
    <version>LATEST</version>
</dependency>

Example: BankAccountNumber

import com.qoomon.domainvalue.type.LongDV;

public class BankAccount extends LongDV {

    protected BankAccount(Long value) {
        super(value);
    }

    @FactoryMethod
    public static BankAccount of(Long value) {
        return new BankAccount(value);
    }

    /**
    * rember to call the super validation method first
    */
    @ValidationMethod
    public static boolean isValid(Long value) {
        return LongDV.isValid(value)
            && value > 1000000;
    }
}
You can’t perform that action at this time.