I hereby claim:
- I am jeppenejsum on github.
- I am nejsum (https://keybase.io/nejsum) on keybase.
- I have a public key ASB6obXfp5wSoBmgdbO6Mf4fwhCEqRRYhqW84agBYaws9go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
private def parser: RowParser[VehicleListItem] = { | |
long("org_unit_id")~str("vin")~(str("license_plate") ?)~(str("driver") ?)~(str("leasing_company") ?)~(date("contract_start")?)~(int("contract_duration")?) map { | |
case ou~vin~licensePlate~driver~lc~contractStart~duration => | |
VehicleListItem(java.util.UUID.randomUUID, VIN(vin), OrgUnitId(ou), licensePlate.getOrElse(""), driver.getOrElse(""), lc.getOrElse(""),contractStart.map(LocalDate.fromDateFields(_)), duration.getOrElse(0)) | |
} | |
} | |
private def specParser: RowParser[VehicleListSpec] = { | |
str("vehicle_type")~str("brand")~str("model")~str("variant")~(str("body_type")?) map { | |
case vt~b~m~variant~bt => VehicleListSpec(vt,b,m,variant,bt.getOrElse("")) |
module ::ArJdbc | |
module PostgreSQL | |
module Column | |
print "In module" | |
def disable_referential_integrity(&block) | |
print "disable jdbc" | |
transaction { | |
begin | |
execute "SET CONSTRAINTS ALL DEFERRED" | |
yield |
def itemListActionsTemplate : NodeSeq = <xml:group> | |
<a crud:edit_href="" title={S.??("edit")} class="ss_sprite ss_pencil" ></a> | |
<a crud:delete_href="" title={S.??("delete")} class="ss_sprite ss_delete"></a> | |
</xml:group> | |
def itemListActions(item: CrudType, in:NodeSeq):NodeSeq = { | |
bind("crud", in, | |
AttrBindParam("edit_href", Text(editItemPathString+"/"+ (obscurePrimaryKey(item))),"href"), | |
AttrBindParam("view_href", Text(viewPathString+"/"+(obscurePrimaryKey(item))),"href"), | |
AttrBindParam("delete_href", Text(deletePathString+"/"+ (obscurePrimaryKey(item))),"href") |
trait PaymentComponent { | |
val paymentService: PaymentService | |
trait PaymentService {def pay(what: String) } | |
} | |
trait PaypalPaymentService extends PaymentComponent { | |
override val paymentService:PaymentService = new PaypalImpl | |
class PaypalImpl extends PaymentService { | |
def pay(what: String) = println("Paypal payment for "+what) | |
} |