test_class.file: model/src/test/java/com/abiquo/server/core/appslibrary/CategoryTest.java
test_class.identifier: CategoryTest
test_class.superclass: extends DefaultEntityTestBase<Category>
test_case.body: @Test
      public void testSetErasable()
      {
          Category category = new Category("Test");
          category.setErasable(true);
          assertTrue(category.isErasable());
  
          category.setErasable(false);
          assertFalse(category.isErasable());
      }
test_case.class_method_signature: CategoryTest.testSetErasable()
test_case.full_signature: @Test public void testSetErasable()
test_case.identifier: testSetErasable
test_case.invocations: setErasable assertTrue isErasable setErasable assertFalse isErasable
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetErasable()
focal_class.declarator: TABLE_NAME = "category"
focal_class.modifier: public static final
focal_class.original_string: public static final String TABLE_NAME = "category";
focal_class.type: String
focal_class.var_name: TABLE_NAME
focal_class.declarator: ID_COLUMN = "idCategory"
focal_class.modifier: private final static
focal_class.original_string: private final static String ID_COLUMN = "idCategory";
focal_class.type: String
focal_class.var_name: ID_COLUMN
focal_class.declarator: id
focal_class.modifier: @Id
      @GeneratedValue
      @Column(name = ID_COLUMN, nullable = false)
      private
focal_class.original_string: @Id
      @GeneratedValue
      @Column(name = ID_COLUMN, nullable = false)
      private Integer id;
focal_class.type: Integer
focal_class.var_name: id
focal_class.declarator: NAME_PROPERTY = "name"
focal_class.modifier: public final static
focal_class.original_string: public final static String NAME_PROPERTY = "name";
focal_class.type: String
focal_class.var_name: NAME_PROPERTY
focal_class.declarator: NAME_REQUIRED = true
focal_class.modifier: private final static
focal_class.original_string: private final static boolean NAME_REQUIRED = true;
focal_class.type: boolean
focal_class.var_name: NAME_REQUIRED
focal_class.declarator: NAME_LENGTH_MIN = 1
focal_class.modifier: final static
focal_class.original_string: final static int NAME_LENGTH_MIN = 1;
focal_class.type: int
focal_class.var_name: NAME_LENGTH_MIN
focal_class.declarator: NAME_LENGTH_MAX = 30
focal_class.modifier: final static
focal_class.original_string: final static int NAME_LENGTH_MAX = 30;
focal_class.type: int
focal_class.var_name: NAME_LENGTH_MAX
focal_class.declarator: NAME_LEADING_OR_TRAILING_WHITESPACES_ALLOWED = false
focal_class.modifier: private final static
focal_class.original_string: private final static boolean NAME_LEADING_OR_TRAILING_WHITESPACES_ALLOWED = false;
focal_class.type: boolean
focal_class.var_name: NAME_LEADING_OR_TRAILING_WHITESPACES_ALLOWED
focal_class.declarator: NAME_COLUMN = "name"
focal_class.modifier: private final static
focal_class.original_string: private final static String NAME_COLUMN = "name";
focal_class.type: String
focal_class.var_name: NAME_COLUMN
focal_class.declarator: name = ""
focal_class.modifier: @Column(name = NAME_COLUMN, nullable = !NAME_REQUIRED, length = NAME_LENGTH_MAX)
      private
focal_class.original_string: @Column(name = NAME_COLUMN, nullable = !NAME_REQUIRED, length = NAME_LENGTH_MAX)
      private String name = "";
focal_class.type: String
focal_class.var_name: name
focal_class.declarator: DEFAULT_PROPERTY = "defaultCategory"
focal_class.modifier: public final static
focal_class.original_string: public final static String DEFAULT_PROPERTY = "defaultCategory";
focal_class.type: String
focal_class.var_name: DEFAULT_PROPERTY
focal_class.declarator: DEFAULT_REQUIRED = true
focal_class.modifier: private final static
focal_class.original_string: private final static boolean DEFAULT_REQUIRED = true;
focal_class.type: boolean
focal_class.var_name: DEFAULT_REQUIRED
focal_class.declarator: DEFAULT_COLUMN = "isDefault"
focal_class.modifier: private final static
focal_class.original_string: private final static String DEFAULT_COLUMN = "isDefault";
focal_class.type: String
focal_class.var_name: DEFAULT_COLUMN
focal_class.declarator: defaultCategory = false
focal_class.modifier: @Column(name = DEFAULT_COLUMN, columnDefinition = "int", nullable = false)
      private
focal_class.original_string: @Column(name = DEFAULT_COLUMN, columnDefinition = "int", nullable = false)
      private boolean defaultCategory = false;
focal_class.type: boolean
focal_class.var_name: defaultCategory
focal_class.declarator: ERASABLE_PROPERTY = "erasable"
focal_class.modifier: public final static
focal_class.original_string: public final static String ERASABLE_PROPERTY = "erasable";
focal_class.type: String
focal_class.var_name: ERASABLE_PROPERTY
focal_class.declarator: ERASABLE_REQUIRED = true
focal_class.modifier: private final static
focal_class.original_string: private final static boolean ERASABLE_REQUIRED = true;
focal_class.type: boolean
focal_class.var_name: ERASABLE_REQUIRED
focal_class.declarator: ERASABLE_COLUMN = "isErasable"
focal_class.modifier: private final static
focal_class.original_string: private final static String ERASABLE_COLUMN = "isErasable";
focal_class.type: String
focal_class.var_name: ERASABLE_COLUMN
focal_class.declarator: erasable
focal_class.modifier: @Column(name = ERASABLE_COLUMN, columnDefinition = "int", nullable = false)
      private
focal_class.original_string: @Column(name = ERASABLE_COLUMN, columnDefinition = "int", nullable = false)
      private boolean erasable;
focal_class.type: boolean
focal_class.var_name: erasable
focal_class.declarator: ENTERPRISE_PROPERTY = "enterprise"
focal_class.modifier: public final static
focal_class.original_string: public final static String ENTERPRISE_PROPERTY = "enterprise";
focal_class.type: String
focal_class.var_name: ENTERPRISE_PROPERTY
focal_class.declarator: ENTERPRISE_REQUIRED = false
focal_class.modifier: private final static
focal_class.original_string: private final static boolean ENTERPRISE_REQUIRED = false;
focal_class.type: boolean
focal_class.var_name: ENTERPRISE_REQUIRED
focal_class.declarator: ENTERPRISE_ID_COLUMN = "idEnterprise"
focal_class.modifier: private final static
focal_class.original_string: private final static String ENTERPRISE_ID_COLUMN = "idEnterprise";
focal_class.type: String
focal_class.var_name: ENTERPRISE_ID_COLUMN
focal_class.declarator: enterprise
focal_class.modifier: @JoinColumn(name = ENTERPRISE_ID_COLUMN)
      @ManyToOne(fetch = FetchType.LAZY)
      @ForeignKey(name = "FK_" + TABLE_NAME + "_enterprise")
      private
focal_class.original_string: @JoinColumn(name = ENTERPRISE_ID_COLUMN)
      @ManyToOne(fetch = FetchType.LAZY)
      @ForeignKey(name = "FK_" + TABLE_NAME + "_enterprise")
      private Enterprise enterprise;
focal_class.type: Enterprise
focal_class.var_name: enterprise
focal_class.file: model/src/main/java/com/abiquo/server/core/appslibrary/Category.java
focal_class.identifier: Category
focal_class.class_method_signature: Category.Category()
focal_class.full_signature: protected  Category()
focal_class.identifier: Category
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.signature:  Category()
focal_class.class_method_signature: Category.Category(final String name)
focal_class.full_signature: public  Category(final String name)
focal_class.identifier: Category
focal_class.modifiers: public
focal_class.parameters: (final String name)
focal_class.signature:  Category(final String name)
focal_class.class_method_signature: Category.getId()
focal_class.full_signature: @Override public Integer getId()
focal_class.identifier: getId
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Integer
focal_class.signature: Integer getId()
focal_class.class_method_signature: Category.setId(final Integer id)
focal_class.full_signature: public void setId(final Integer id)
focal_class.identifier: setId
focal_class.modifiers: public
focal_class.parameters: (final Integer id)
focal_class.return: void
focal_class.signature: void setId(final Integer id)
focal_class.class_method_signature: Category.getName()
focal_class.full_signature: @Required(value = NAME_REQUIRED) @Length(min = NAME_LENGTH_MIN, max = NAME_LENGTH_MAX) @LeadingOrTrailingWhitespace(allowed = NAME_LEADING_OR_TRAILING_WHITESPACES_ALLOWED) public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Required(value = NAME_REQUIRED) @Length(min = NAME_LENGTH_MIN, max = NAME_LENGTH_MAX) @LeadingOrTrailingWhitespace(allowed = NAME_LEADING_OR_TRAILING_WHITESPACES_ALLOWED) public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: Category.setName(final String name)
focal_class.full_signature: public void setName(final String name)
focal_class.identifier: setName
focal_class.modifiers: public
focal_class.parameters: (final String name)
focal_class.return: void
focal_class.signature: void setName(final String name)
focal_class.class_method_signature: Category.isDefaultCategory()
focal_class.full_signature: @Required(value = DEFAULT_REQUIRED) public boolean isDefaultCategory()
focal_class.identifier: isDefaultCategory
focal_class.modifiers: @Required(value = DEFAULT_REQUIRED) public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isDefaultCategory()
focal_class.class_method_signature: Category.setDefaultCategory(final boolean defaultCategory)
focal_class.full_signature: private void setDefaultCategory(final boolean defaultCategory)
focal_class.identifier: setDefaultCategory
focal_class.modifiers: private
focal_class.parameters: (final boolean defaultCategory)
focal_class.return: void
focal_class.signature: void setDefaultCategory(final boolean defaultCategory)
focal_class.class_method_signature: Category.isErasable()
focal_class.full_signature: @Required(value = ERASABLE_REQUIRED) public boolean isErasable()
focal_class.identifier: isErasable
focal_class.modifiers: @Required(value = ERASABLE_REQUIRED) public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isErasable()
focal_class.class_method_signature: Category.setErasable(final boolean erasable)
focal_class.full_signature: public void setErasable(final boolean erasable)
focal_class.identifier: setErasable
focal_class.modifiers: public
focal_class.parameters: (final boolean erasable)
focal_class.return: void
focal_class.signature: void setErasable(final boolean erasable)
focal_class.class_method_signature: Category.defaultCategory(final String name)
focal_class.full_signature: @VisibleForTesting /* package */static Category defaultCategory(final String name)
focal_class.identifier: defaultCategory
focal_class.modifiers: @VisibleForTesting /* package */static
focal_class.parameters: (final String name)
focal_class.return: Category
focal_class.signature: Category defaultCategory(final String name)
focal_class.class_method_signature: Category.getEnterprise()
focal_class.full_signature: @Required(value = ENTERPRISE_REQUIRED) public Enterprise getEnterprise()
focal_class.identifier: getEnterprise
focal_class.modifiers: @Required(value = ENTERPRISE_REQUIRED) public
focal_class.parameters: ()
focal_class.return: Enterprise
focal_class.signature: Enterprise getEnterprise()
focal_class.class_method_signature: Category.setEnterprise(final Enterprise enterprise)
focal_class.full_signature: public void setEnterprise(final Enterprise enterprise)
focal_class.identifier: setEnterprise
focal_class.modifiers: public
focal_class.parameters: (final Enterprise enterprise)
focal_class.return: void
focal_class.signature: void setEnterprise(final Enterprise enterprise)
focal_class.superclass: extends DefaultEntityBase
focal_method.body: public void setErasable(final boolean erasable)
      {
          if (erasable && this.defaultCategory)
          {
              throw new IllegalStateException("Default category cannot be made erasable");
          }
          this.erasable = erasable;
      }
focal_method.class_method_signature: Category.setErasable(final boolean erasable)
focal_method.full_signature: public void setErasable(final boolean erasable)
focal_method.identifier: setErasable
focal_method.modifiers: public
focal_method.parameters: (final boolean erasable)
focal_method.return: void
focal_method.signature: void setErasable(final boolean erasable)