com.kenshoo.pl.entity.TripleUniqueKey Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of persistence-layer Show documentation
Show all versions of persistence-layer Show documentation
A Java persistence layer based on JOOQ for high performance and business flow support.
package com.kenshoo.pl.entity;
public class TripleUniqueKey, A, B, C> extends UniqueKey {
private final EntityField a;
private final EntityField b;
private final EntityField c;
public TripleUniqueKey(EntityField a, EntityField b, EntityField c) {
//noinspection unchecked
super(new EntityField[]{a, b, c});
this.a = a;
this.b = b;
this.c = c;
}
protected TripleUniqueKeyValue createValue(A a, B b, C c) {
return new TripleUniqueKeyValue<>(new TripleUniqueKey<>(this.a, this.b, this.c), a, b, c);
}
@Override
public Identifier createValue(FieldsValueMap fieldsValueMap) {
return createValue(fieldsValueMap.get(a), fieldsValueMap.get(b), fieldsValueMap.get(c));
}
}