org.apache.ojb.broker.query
Class UserAlias

java.lang.Object
  extended by org.apache.ojb.broker.query.UserAlias
All Implemented Interfaces:
java.io.Serializable

public class UserAlias
extends java.lang.Object
implements java.io.Serializable

This class is used to specify the path segments of a Criteria that should have associated table aliases. Previously, the default behaviour was that all path segments participated in the alias

Author:
Phil Warrick
See Also:
Serialized Form

Constructor Summary
UserAlias(java.lang.String name)
          Constructor declaration
UserAlias(java.lang.String name, java.lang.String attributePath, boolean allPathsAliased)
          Constructor declaration
UserAlias(java.lang.String name, java.lang.String attributePath, java.lang.String aliasPath)
          Constructor declaration
 
Method Summary
 void add(java.lang.String path)
          Adds a path to the aliased paths
 java.lang.String getAlias(java.lang.String path)
          Returns the name of this alias if path has been added to the aliased portions of attributePath
 java.lang.String getName()
          Returns the name of this alias
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAlias

public UserAlias(java.lang.String name)
Constructor declaration

Parameters:
name - the name of the alias

UserAlias

public UserAlias(java.lang.String name,
                 java.lang.String attributePath,
                 java.lang.String aliasPath)
Constructor declaration

Parameters:
name - the name of the alias
attributePath - the full path of the SelectionCriteria attribute
aliasPath - the portion of the attributePath which should be aliased. This should be unambiguous. If ambiguous portions need aliasing (e.g. B.C in allAs.B.C.B.C), use add() instead

UserAlias

public UserAlias(java.lang.String name,
                 java.lang.String attributePath,
                 boolean allPathsAliased)
Constructor declaration

Parameters:
name - the name of the alias
attributePath - the full path of the SelectionCriteria attribute
allPathsAliased - indicates that all path portions of attributePath should be aliased (previously was the default)
Method Detail

getName

public java.lang.String getName()
Returns the name of this alias


getAlias

public java.lang.String getAlias(java.lang.String path)
Returns the name of this alias if path has been added to the aliased portions of attributePath

Parameters:
path - the path to test for inclusion in the alias

add

public void add(java.lang.String path)
Adds a path to the aliased paths

Parameters:
path - the path to add to the aliased paths


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30