@Override public PromotionRun newPromotionRun(PromotionRun promotionRun) { return promotionRun.withId( id( dbCreate( "INSERT INTO PROMOTION_RUNS(BUILDID, PROMOTIONLEVELID, CREATION, CREATOR, DESCRIPTION) VALUES (:buildId, :promotionLevelId, :creation, :creator, :description)", params("buildId", promotionRun.getBuild().id()) .addValue("promotionLevelId", promotionRun.getPromotionLevel().id()) .addValue("description", promotionRun.getDescription()) .addValue("creation", dateTimeForDB(promotionRun.getSignature().getTime())) .addValue("creator", promotionRun.getSignature().getUser().getName()) ) ) ); }