package managers.nodes;

import com.fasterxml.jackson.databind.JsonNode;
import play.libs.F.Promise;


public class UserManager extends LabeledNodeWithPropertiesManager {

    public UserManager() {
        this.label = "User";
    }

    @Override
    protected Promise<Boolean> create(JsonNode properties, String location) {
        return super.create(properties, location, "username");
    }

}

package managers.nodes;

import com.fasterxml.jackson.databind.JsonNode;
import play.libs.F.Promise;


public class UserManager extends LabeledNodeWithPropertiesManager {

    public UserManager() {
        this.label = "User";
    }

    // CREATE

    @Override
    protected Promise<Boolean> create(JsonNode properties, String location) {
        return super.create(properties, location, "username");
    }

}

Enable operations that write to the DB to be rolled back on error by wrapping them in transactions.