*/
public final String toInsertQuery(List<Long> primaryKey, boolean isServer, long ts, Employee employee) {
List<String> names = new ArrayList<String>();
List<String> formattings = new ArrayList<String>();
List<Object> values = new ArrayList<Object>();
final ObjectDescription descr = getDescription();
if (!descr.isRelation()) {
if (!isServer || descr.isClientControlled()) {
names.add("id");
formattings.add("%d");
values.add(primaryKey.get(0));
}
if (descr.isClientControlled()) {
names.add("employee");
formattings.add("%d");
values.add(primaryKey.get(1));
}
}
for (AttributeDescription attributeDescription : descr.getAttributes()) {
if (attributeDescription.getType() == AttributeDescription.AttrType.AT_PASSWORD_STRING && !isServer) {
// No password column on the client
continue;
}
names.add(attributeDescription.getColumnName());