/**
* Id number of category
*/
- private Long categoryId;
+ private Long id;
/**
- * Parent category categoryId
+ * Parent category id
*/
private Long parentId;
/**
* Constructor which accepts all database fields
*
- * @param categoryId Id number of database record
+ * @param id Id number of database record
* @param title Category title
- * @param parentId Parent categoryId
+ * @param parentId Parent id
*/
- protected BaseCategory (final Long categoryId, final String title, final Long parentId) {
+ protected BaseCategory (final Long id, final String title, final Long parentId) {
// Set all here
- this.categoryId = categoryId;
+ this.id = id;
this.title = title;
this.parentId = parentId;
}
throw new NullPointerException("category is null"); //NOI18N
}
- // Is the categoryId the same?
- if (Objects.equals(this.getCategoryId(), category.getCategoryId())) {
- // Same categoryId, means same category
+ // Is the id the same?
+ if (Objects.equals(this.getId(), category.getId())) {
+ // Same id, means same category
return 0;
- } else if (this.getCategoryId() > category.getCategoryId()) {
- // This categoryId is larger than compared to
+ } else if (this.getId() > category.getId()) {
+ // This id is larger than compared to
return -1;
}
- // The other categoryId is larger
+ // The other id is larger
return 1;
}
/**
* Id number of category
*
- * @return the categoryId
+ * @return the id
*/
@Override
- public Long getCategoryId () {
- return this.categoryId;
+ public Long getId () {
+ return this.id;
}
/**
* Id number of category
*
- * @param categoryId the categoryId to set
+ * @param id the id to set
*/
@Override
- public void setCategoryId (final Long categoryId) {
- this.categoryId = categoryId;
+ public void setId (final Long id) {
+ this.id = id;
}
/**
- * Parent category categoryId
+ * Parent category id
*
* @return the parentId
*/
}
/**
- * Parent category categoryId
+ * Parent category id
*
* @param parentId the parentId to set
*/