@Override
    protected ObjectPermissionModel getModelInstance(
            ModeledPermissions<? extends EntityModel> targetEntity,
            ObjectPermission permission) {

        ObjectPermissionModel model = new ObjectPermissionModel();

        // Populate model object with data from entity and permission
        model.setEntityID(targetEntity.getModel().getEntityID());
        model.setType(permission.getType());
        model.setObjectIdentifier(permission.getObjectIdentifier());

        return model;
        
    }
Service which provides convenience methods for creating, retrieving, and
deleting object permissions within a backend database model. This service
will automatically enforce the permissions of the current user.
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/permission/ModeledObjectPermissionService.java