protected boolean isResourceMain(ClassedModel classedModel) {
    if (classedModel instanceof ResourcedModel) {
      ResourcedModel resourcedModel = (ResourcedModel) classedModel;

      return resourcedModel.isResourceMain();
    }

    return true;
  }
  protected long getClassPK(ClassedModel classedModel) {
    if (classedModel instanceof ResourcedModel) {
      ResourcedModel resourcedModel = (ResourcedModel) classedModel;

      return resourcedModel.getResourcePrimKey();
    } else {
      return (Long) classedModel.getPrimaryKeyObj();
    }
  }