}
}
}
public SAcl save(String target, long targetId, S3Grant grant, int grantOrder) {
SAcl aclEntry = new SAcl();
aclEntry.setTarget(target);
aclEntry.setTargetId(targetId);
aclEntry.setGrantOrder(grantOrder);
int grantee = grant.getGrantee();
aclEntry.setGranteeType(grantee);
aclEntry.setPermission(grant.getPermission());
aclEntry.setGranteeCanonicalId(grant.getCanonicalUserID());
Date ts = new Date();
aclEntry.setCreateTime(ts);
aclEntry.setLastModifiedTime(ts);
PersistContext.getSession().save(aclEntry);
return aclEntry;
}