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 .