/** Save the instance even if it does not exist.
* @param instance the instance to save
*/
public <T> T savePersistent(T instance) {
DomainTypeHandler domainTypeHandler = getDomainTypeHandler(instance);
if (logger.isDetailEnabled()) logger.detail("UpdatePersistent on object " + instance);
ValueHandler valueHandler = domainTypeHandler.getValueHandler(instance);
startAutoTransaction();
setPartitionKey(domainTypeHandler, valueHandler);
Table storeTable = null;
try {
storeTable = domainTypeHandler.getStoreTable();
Operation op = null;
op = clusterTransaction.getWriteOperation(storeTable);
domainTypeHandler.operationSetKeys(valueHandler, op);
domainTypeHandler.operationSetModifiedNonPKValues(valueHandler, op);
if (logger.isDetailEnabled()) logger.detail("Wrote object " +
valueHandler);
} catch (ClusterJException ex) {
failAutoTransaction();
throw new ClusterJException(