org.eclipse.datatools.sqltools.sqleditor.internal.sql
Class SQLSegment

java.lang.Object
  extended by org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLSegment

public class SQLSegment
extends java.lang.Object

This class defines a segment in a SQL source document.


Constructor Summary
SQLSegment()
          Creates an instance of this class.
 
Method Summary
 int getIndex()
          Gets the index of this partition segment.
 java.lang.String getKind()
          Gets a string indicating the kind of partition segment this is.
 java.lang.String getMessage()
          Gets the message associated with this partition segment, or null if the partition segment has no message.
 java.lang.String getPartitionLabel()
          Gets the partition label of this partition segment.
 org.eclipse.jface.text.Position getPosition()
          Gets the position of this segment.
 java.lang.String getType()
          Gets the type of this partition segment.
 boolean isValid()
          Gets whether or not the partition segment is valid.
 void setIndex(int index)
          Sets the index of the partition segment to the given value.
 void setKind(java.lang.String kind)
          Sets what kind of partition segment this is.
 void setMessage(java.lang.String message)
          Sets the message associated with this partition segment to the given message.
 void setPartitionLabel(java.lang.String partitionLabel)
          Sets the partition label of this partition segment to the given label.
 void setPosition(org.eclipse.jface.text.Position position)
          Sets the position of the partition segment to the given position.
 void setType(java.lang.String partitionType)
          Sets the type of this partition segment to the given type.
 void setValid(boolean valid)
          Sets whether or not the partition segment is valid.
 java.lang.String toString()
          Returns a String that represents the value of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLSegment

public SQLSegment()
Creates an instance of this class. This is the default constructor.

Method Detail

getIndex

public int getIndex()
Gets the index of this partition segment.

Returns:
the partition segment index

getKind

public java.lang.String getKind()
Gets a string indicating the kind of partition segment this is.

Returns:
the partition segment kind

getMessage

public java.lang.String getMessage()
Gets the message associated with this partition segment, or null if the partition segment has no message.

Returns:
the message associated with the segment

getPartitionLabel

public java.lang.String getPartitionLabel()
Gets the partition label of this partition segment.

Returns:
the partition segment label

getPosition

public org.eclipse.jface.text.Position getPosition()
Gets the position of this segment.

Returns:
the segments position

getType

public java.lang.String getType()
Gets the type of this partition segment.

Returns:
the partition segment's type

isValid

public boolean isValid()
Gets whether or not the partition segment is valid.

Returns:
true when the partition segment is valid, otherwise false

setIndex

public void setIndex(int index)
Sets the index of the partition segment to the given value.

Parameters:
index - the partition segment index

setKind

public void setKind(java.lang.String kind)
Sets what kind of partition segment this is.

Parameters:
kind - the partition segment kind

setMessage

public void setMessage(java.lang.String message)
Sets the message associated with this partition segment to the given message.

Parameters:
message - the message to associate with the segment

setPartitionLabel

public void setPartitionLabel(java.lang.String partitionLabel)
Sets the partition label of this partition segment to the given label.

Parameters:
partitionLabel - the partition label to set

setPosition

public void setPosition(org.eclipse.jface.text.Position position)
Sets the position of the partition segment to the given position.

Parameters:
position - the position of this partition segment

setType

public void setType(java.lang.String partitionType)
Sets the type of this partition segment to the given type.

Parameters:
partitionType - the partition segment type to set

setValid

public void setValid(boolean valid)
Sets whether or not the partition segment is valid.

Parameters:
valid - true when the partition segment is valid, otherwise false

toString

public java.lang.String toString()
Returns a String that represents the value of this object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the receiver