/**
  * Create a DBO from the ACL
  *
  * @param acl
  * @return
  * @throws DatastoreException
  */
 public static DBOAccessControlList createDBO(AccessControlList acl) throws DatastoreException {
   DBOAccessControlList dbo = new DBOAccessControlList();
   dbo.setId(KeyFactory.stringToKey(acl.getId()));
   dbo.setEtag(acl.getEtag());
   dbo.setCreationDate(acl.getCreationDate().getTime());
   return dbo;
 }
 /**
  * Create an ACL from a DBO.
  *
  * @param dbo
  * @return
  * @throws DatastoreException
  */
 public static AccessControlList createAcl(DBOAccessControlList dbo, ObjectType objectType)
     throws DatastoreException {
   AccessControlList acl = new AccessControlList();
   if (ObjectType.ENTITY.equals(objectType)) {
     acl.setId(KeyFactory.keyToString(dbo.getId()));
   } else {
     acl.setId(dbo.getId().toString());
   }
   acl.setEtag(dbo.getEtag());
   acl.setCreationDate(new Date(dbo.getCreationDate()));
   return acl;
 }