Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * The SmartWeb Framework
   * Copyright (C) 2004-2006
   *
   * This library is free software; you can redistribute it and/or
   * modify it under the terms of the GNU Lesser General Public
   * License as published by the Free Software Foundation; either
   * version 2.1 of the License, or (at your option) any later version.
   *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  *
  * For further informations on the SmartWeb Framework please visit
  *
  *                        http://smartweb.sourceforge.net
  */
 package net.smartlab.web.registry;
 
 import java.util.Map;
 import java.util.Set;
 
Represents a logical entry in the registry. Logical entries are the registry elements thus they does not provide any specific information about the real entry information. As consequence they are not instantiable by their own. Registry entries could be categorized into two main types:
  • groups of entries, also known as list;
  • simple entries, also known as entity.
The categorization, as defined above, doesn't preclude the definition of a list containing both entities and lists.

Author(s):
rlogiacco
Hibernate.class:
schema="registry" table="`entry`"
 
 public abstract class Entry extends BusinessObject implements Comparable {
 
 	private final static long serialVersionUID = -2207896799625759184L;

The unique identifier.
 
 	private long id;

The text displayed to describe this entry.
 
 	private String display;

An associative map of properties related to this entry. This map should be used to enrich the entry with custom values. Be carefull as search on a specific combination of properties is not supported by default as it could be really expensive.
 
 	protected Map properties = new HashMap();

The list set in witch the entry is contained
 
 	private Set lists = new TreeSet();


Returns the unique identifier.

Returns:
the unique identifier.
Hibernate.id:
column="`id`" unsaved-value="0" generator-class="native"
 
 	public long getId() {
 		return this.;
 	}

Sets the unique identifier.

Parameters:
id the unique identifier to set.
 
 	public void setId(long id) {
 		this. = id;
 	}

Returns the text displayed to describe this entry.

Returns:
the text displayed to describe this entry.
Hibernate.property:
column="`display`" length="50" not-null="true"
 
	public String getDisplay() {
		return this.;
	}

Sets the text displayed to describe this entry.

Parameters:
display the text displayed to describe this entry.
	public void setDisplay(String display) {
		this. = display;
	}

Returns an associative map of properties related to this entry. This map should be used to enrich the entry with custom values. Be carefull as search on a specific combination of properties is not supported by default as it could be really expensive.

Returns:
the properties associated with this entry.
Hibernate.map:
lazy="true" schema="registry" table="`property`" inverse="false" cascade="all"
Hibernate.collection:
key column="`entry`"
Hibernate.collection:
index column="`name`" type="java.lang.String" length="50"
Hibernate.collection:
element column="`value`" type="java.lang.String" length="255"
	public Map getProperties() {
		return ;
	}

Sets an associative map of properties related to this entry. This map should be used to enrich the entry with custom values. Be carefull as search on a specific combination of properties is not supported by default as it could be really expensive.

Parameters:
properties the properties to associate to this entry.
	protected void setProperties(Map properties) {
		this. = properties;
	}

Sets a property into the associative map of properties related to this entry. This map should be used to enrich the entry with custom values. Be carefull as search on a specific combination of properties is not supported by default as it could be really expensive.

Parameters:
name the property name.
value the property value.
	public void setProperty(String nameString value) {
		this..put(namevalue);
	}

Removes a property from the associative map of properties related to this entry. This map should be used to enrich the entry with custom values. Be carefull as search on a specific combination of properties is not supported by default as it could be really expensive.

Parameters:
name the property name.
	public void removeProperty(String name) {
		this..remove(name);
	}

Finds a property into the associative map of properties related to this entry. This map should be used to enrich the entry with custom values. Be carefull as search on a specific combination of properties is not supported by default as it could be really expensive.

Parameters:
name the property name.
Returns:
the property value or null if a property with that name was never defined.
	public String getProperty(String name) {
		return (String).get(name);
	}

Returns:
TODO:
documentation
Hibernate.set:
lazy="true" schema="registry" table="`list_entry`" sort="natural" inverse = "true" *
Hibernate.collection:
key column="`entry`"
Hibernate.collection:
many-to-many column="`list`" class="net.smartlab.web.registry.List"
	public Set getLists() {
		return ;
	}

TODO documentation

Parameters:
lists
	public void setLists(Set lists) {
		this. = lists;
	}

Checks if the entry represents a group of entries.

Returns:
true if and only if the entry is a collection of entries.
	public boolean isList() {
		return this instanceof List;
	}

	public int compareTo(Object entry) {
		if(entry == null){
			throw new IllegalArgumentException(" Entry cannot be null");
		}
		if(((Entry)entry).getDisplay() == null){
			throw new IllegalArgumentException(" Display cannot be null");
		}
		if (entry instanceof Entry) {
			return this.getDisplay().compareTo(((Entry)entry).getDisplay());
else {
			throw new ClassCastException();
		}
	}

TODO documentation

Parameters:
type
Returns:
	protected boolean isInstance(Class type){
		return type.isInstance(this) ;
	}
	public long getVersion() {
		return super.getVersion();
	}
New to GrepCode? Check out our FAQ X