All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nico.aoc.book.Book Maven / Gradle / Ivy

There is a newer version: 1.1.3
Show newest version
package org.nico.aoc.book;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 存放book标签属性
 * @author nico
 *
 */
public class Book {
	
	private String id;
	
	private Class clazz;
	
	private Object object;
	
	private BookTag bookTag;
	
	private Set reliers;
	
	public Book(String id, Class clazz) {
		this.id = id;
		this.clazz = clazz;
		this.reliers = new HashSet();
	}
	
	public void newInstance() throws InstantiationException, IllegalAccessException{
		if(this.clazz != null){
			this.object = this.clazz.newInstance();
		}
	}

	public Set getReliers() {
		return reliers;
	}

	public BookTag getBookTag() {
		return bookTag;
	}

	public void setBookTag(BookTag bookTag) {
		this.bookTag = bookTag;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Class getClazz() {
		return clazz;
	}

	public void setClazz(Class clazz) {
		this.clazz = clazz;
	}

	public Object getObject() {
		return object;
	}

	public void setObject(Object object) {
		this.object = object;
	}
	
	public static class Relier{
		
		private Book book;
		
		private String fieldName;

		public Relier(Book book, String fieldName) {
			super();
			this.book = book;
			this.fieldName = fieldName;
		}

		public Book getBook() {
			return book;
		}

		public void setBook(Book book) {
			this.book = book;
		}

		public String getFieldName() {
			return fieldName;
		}

		public void setFieldName(String fieldName) {
			this.fieldName = fieldName;
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy