core/src/main/java/nl/pwiddershoven/jfactory/PersistableObjectFactory.java
public T create(Object... attributes) {
        // build
        T object = build(attributes);

        // excute beforeCreate callback
        executeCallbacks(BeforeFactoryCreate.class, object);

        // persist
        persist(object);

        // execute after create callback
        executeCallbacks(AfterFactoryCreate.class, object);

        // return
        return object;
    }
public T create(Object... attributes) {
        // build
        T object = build(attributes);

        // excute beforeCreate callback
        executeCallbacks(BeforeFactoryCreate.class, object);

        // persist
        persist(object);

        // execute after create callback
        executeCallbacks(AfterFactoryCreate.class, object);

        // return
        return object;
    }
Create an object with the given attributes.
First builds the object, than persists it.
@param attributes
@return