📄 catalog.java
字号:
package com.sush.webstore.store.domain.beans;
import java.util.HashSet;
import java.util.Set;
import com.sush.webstore.store.domain.ICatalog;
import com.sush.webstore.store.domain.IImages;
public class Catalog implements ICatalog {
private long id;
private String name;
private String description;
private Set<Category> categories = new HashSet<Category>();
private Images images = new Images();
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the id
*/
public long getId() {
return id;
}
/**
* @param id
* the id to set
*/
private void setId(long id) {
this.id = id;
}
/**
* @return the categories
*/
public Set<Category> getCategories() {
return categories;
}
/**
* @param categories
* the categories to set
*/
public void setCategories(Set<Category> categories) {
this.categories = categories;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name
* the name to set
*/
public void setName(String name) {
this.name = name;
}
public void addCategory(Category category) {
this.categories.add(category);
}
public void removeCategory(Category category) {
this.categories.remove(category);
}
/**
* @return the images
*/
public IImages getIImages() {
return images;
}
/**
* @param images
* the images to set
*/
public void setImages(Images images) {
this.images = images;
}
/**
* @return the images
*/
public Images getImages() {
return images;
}
// @Override
// public boolean equals(Object obj) {
//
// if (this == obj)
// return true;
//
// if (this.getClass() != obj.getClass())
// return false;
//
// Catalog objP = (Catalog) obj;
//
// return (objP.id == this.id) ? true : false;
// }
//
// @Override
// public int hashCode() {
//
// int hash = 7;
// hash = hash * 31 + new Integer(Long.toString(id));
// return hash;
// }
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -