Click here to Skip to main content
15,892,298 members
Articles / Programming Languages / UML

Building Tree Structure Domain Model

Rate me:
Please Sign up or sign in to vote.
3.00/5 (3 votes)
12 Dec 2008CPOL1 min read 34.8K   227   9  
How to build domain model with tree structure, thinking Object-Oriented
package org.schedulemanager.demo.model;

import java.util.ArrayList;
import java.util.List;

public abstract class Job {
	protected String id;
	protected String name;
	protected String circle;
	protected String type;

	public final static String BATCHJOB = "BATCHJOB";
	public final static String JOBGROUP = "JOBGROUP";
	
	public final static String DAILY = "DAILY";
	public final static String WEEKLY = "WEEKLY";
	public final static String MONTHLY = "MONTHLY";
	
	public Job(String id) {
		this.id = id ;
	}
	
	public String getId() {
		return id;
	}

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

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public abstract void addJob(Job job);
	public abstract List<Job> getJobList();
	

}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Taiwan Taiwan
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions