/*
- * Copyright (C) 2015 Roland Haeder
+ * Copyright (C) 2016 Roland Haeder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
package org.mxchange.jshopcore.model.category;
-import java.io.UnsupportedEncodingException;
-import org.mxchange.jshopcore.ShopInterface;
+import java.io.Serializable;
/**
* An interface for categories
- *
- * @author Roland Haeder
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
*/
-public interface Category extends ShopInterface, Comparable<Category> {
+public interface Category extends Serializable {
+
+ /**
+ * Copies all properties from other category to this
+ * <p>
+ * @param category Source category instance
+ */
+ void copyAll (final Category category);
/**
* Id number of category
+ * <p>
* @return the id
*/
- public Long getCategoryId ();
+ Long getCategoryId ();
/**
* Id number of category
+ * <p>
* @param id the id to set
*/
- public void setCategoryId (final Long id);
+ void setCategoryId (final Long id);
/**
- * Parent category id
- * @return the parent
+ * Parent category
+ * <p>
+ * @return the parent category
*/
- public Long getParentId ();
+ Category getParentCategory ();
/**
- * Parent category id
- * @param parent the parent to set
+ * Parent category
+ * <p>
+ * @param parentCategory the parent category to set
*/
- public void setParentId (final Long parent);
+ void setParentCategory (final Category parentCategory);
/**
* Title of category
+ * <p>
* @return the title
*/
- public String getTitle ();
+ String getCategoryTitle ();
/**
* Title of category
+ * <p>
* @param title the title to set
*/
- public void setTitle (final String title);
-
- /**
- * Compare method
- * @param category Category to compare to
- * @return Comparison value
- */
- @Override
- public int compareTo (final Category category);
-
- /**
- * Decodes the UTF8-encoded title
- *
- * @return Decoded title
- * @throws java.io.UnsupportedEncodingException If the encoding UTF-8 is not supported
- */
- public String getDecodedTitle () throws UnsupportedEncodingException ;
+ void setCategoryTitle (final String title);
}