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;
 
 
The representation of a generic address. Subclasses must add the properties needed to fully and correctly describe the specific address type.

Author(s):
rlogiacco
Hibernate.class:
schema="registry" table="`address`"
Uml.dependency:
supplier="net.smartlab.web.registry.Entity"
 
  
 public abstract class Address extends BusinessObject implements Comparable {
 
 	private final static long serialVersionUID = -4838144615188719235L;

The unique identifier.
 
 	private long id;

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

The priority assigned to this address. Addresses are grouped by type and used in descending priority order.
 
 	private int priority;

The registry entity which references this address.

ClientCardinality:
0..*
SupplierCardinality:
1
Uml.property:
name="entity"
Uml.associationEnd:
inverse="addresses:net.smartlab.web.registry.Entity"
Uml.association:
name="has "
 
 	private Entity entity;


Returns the unique identification number.

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

Sets the unique identification number.

Parameters:
id the unique identification number.
 
 	public void setId(long id) {
 		this. = id;
 	}

Returns the text displayed to describe this address.

Returns:
the text displayed to describe this address.
Hibernate.property:
column="`display`" length="150"
 
 	public String getDisplay() {
 		return ;
 	}

Sets the text displayed to describe this address.

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

Returns the priority assigned to this address. Addresses are grouped by type and used in descending priority order.

Returns:
the priority assigned to this address
Hibernate.property:
column="`priority`"
	public int getPriority() {
		return ;
	}

Sets the priority assigned to this address. Addresses are grouped by type and used in descending priority order.

Parameters:
priority the priority assigned to this address
	public void setPriority(int priority) {
		this. = priority;
	}

Returns the registry entity which references this address.

Returns:
returns the registry entity which references this address.
See also:
also Entity
Hibernate.many:
to-one column="`entity`"
Uml.property:
name="entity"
	public Entity getEntity() {
		return ;
	}

Sets the registry entity which references this address.

Parameters:
entity the registry entity which references this address to set.
Uml.property:
name="entity"
	public void setEntity(Entity entity) {
		this. = entity;
	}

Each address is characterized by owner fields

Returns:
a String which describe the address.
	public abstract String getFormattedString();

	public int compareTo(Object object) {
		Address address = ((Address)object);
		if(this.getPriority() - address.getPriority() == 0){
		}
		return this.getPriority() - address.getPriority();
	}
	public long getVersion() {
		return super.getVersion();
	}
	protected String normalizeNull(String withNull){
		if(StringUtils.isEmpty(withNull)){
			return "";
		}
		return withNull;
	}
New to GrepCode? Check out our FAQ X