AR System Java API

com.bmc.arsys.api
Class QuerySourceForm

java.lang.Object
  extended by com.bmc.arsys.api.QuerySourceForm
All Implemented Interfaces:
IQuerySource, Cloneable

public class QuerySourceForm
extends Object
implements IQuerySource, Cloneable

The QuerySourceForm class represents the form containing the entries to be retrieved through a dynamic query.

See Also:
RegularQuery, RecursiveQuery, IQuerySource

Field Summary
 
Fields inherited from interface com.bmc.arsys.api.IQuerySource
AR_MULTI_SCHEMA_JOIN_INNER, AR_MULTI_SCHEMA_JOIN_LEFT, AR_MULTI_SCHEMA_JOIN_NONE, AR_MULTI_SCHEMA_JOIN_RIGHT
 
Constructor Summary
QuerySourceForm()
           
QuerySourceForm(String name)
           
QuerySourceForm(String name, IQuerySource sourceJoinedWith, int joinType, QualifierInfo joinQualifier)
           
 
Method Summary
 Object clone()
          Clone implementation that returns an Object with data cloned from self.
 boolean equals(Object obj)
           
 String getAlias()
          Internal use.
 IQuerySource getJoinedWith()
          Returns the IQuerySource source this source is joined with.
 QualifierInfo getJoinQualifier()
          Returns the join qualifier.
 int getJoinType()
          Returns the type of a join.
 String getName()
          Returns the form name
 int hashCode()
           
 void setJoin(IQuerySource sourceJoinedWith, int joinType, QualifierInfo joinQualifier)
          Sets the join properties for this form.
 void setJoinedWith(IQuerySource sourceJoinedWith)
          Sets the IQuerySource source to be joined with.
 void setJoinQualifier(QualifierInfo joinQualifier)
          Sets the join qualifier.
 void setJoinType(int joinType)
          Sets the type of a join.
 void setName(String formName)
          Sets the form name
 String toString()
          Returns a string description of the object.
 String toStringShort()
          Returns a simplified string description of the object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuerySourceForm

public QuerySourceForm()

QuerySourceForm

public QuerySourceForm(String name)

QuerySourceForm

public QuerySourceForm(String name,
                       IQuerySource sourceJoinedWith,
                       int joinType,
                       QualifierInfo joinQualifier)
Method Detail

setJoin

public void setJoin(IQuerySource sourceJoinedWith,
                    int joinType,
                    QualifierInfo joinQualifier)
Sets the join properties for this form. Example of joining the printer, computer and memory forms.
 SELECT fields FROM Printer J0
 INNER JOIN Computer J1 ON (qualifier) 
 INNER JOIN Memory J2 ON (qualifier)
  
 RegularQuery query = new RegularQuery();
 ...
 
 // order in which the sources are added determines the order of the join generation
  
 query.addFromSource(printerForm);
 query.addFromSource(computerForm);
 query.addFromSource(memoryForm);
 ... 
 
 // computer form sets a join with the printer form, not the other way around          
 
 computerForm.setJoin(printerForm, IQuerySource.AR_MULTI_SCHEMA_JOIN_INNER, joinQual1);
 memoryForm.setJoin(computerForm, IQuerySource.AR_MULTI_SCHEMA_JOIN_INNER, joinQual2);
 


getJoinQualifier

public QualifierInfo getJoinQualifier()
Returns the join qualifier.

Specified by:
getJoinQualifier in interface IQuerySource

setJoinQualifier

public void setJoinQualifier(QualifierInfo joinQualifier)
Sets the join qualifier.

Specified by:
setJoinQualifier in interface IQuerySource

getJoinType

public int getJoinType()
Returns the type of a join.

Specified by:
getJoinType in interface IQuerySource

setJoinType

public void setJoinType(int joinType)
Sets the type of a join.

Specified by:
setJoinType in interface IQuerySource

getJoinedWith

public IQuerySource getJoinedWith()
Returns the IQuerySource source this source is joined with.

Specified by:
getJoinedWith in interface IQuerySource

setJoinedWith

public void setJoinedWith(IQuerySource sourceJoinedWith)
Sets the IQuerySource source to be joined with.

Specified by:
setJoinedWith in interface IQuerySource
See Also:
setJoin(com.bmc.arsys.api.IQuerySource, int, com.bmc.arsys.api.QualifierInfo)

setName

public void setName(String formName)
Sets the form name


getName

public String getName()
Returns the form name


getAlias

public String getAlias()
Description copied from interface: IQuerySource
Internal use.

Specified by:
getAlias in interface IQuerySource

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

clone

public Object clone()
             throws CloneNotSupportedException
Clone implementation that returns an Object with data cloned from self.

Specified by:
clone in interface IQuerySource
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

toString

public String toString()
Returns a string description of the object.

Overrides:
toString in class Object

toStringShort

public String toStringShort()
Returns a simplified string description of the object. Used for API logging.

Specified by:
toStringShort in interface IQuerySource

AR System Java API

? Copyright 2006, 2007 BMC Software, Inc.