org.stanwood.media.database
Interface IDBTokenMappings

All Known Implementing Classes:
DBRegExpTokenMapping

public interface IDBTokenMappings

This interfaces should be implemented by classes that want to translate a parts of a SQL Query from MySQL to another native type of SQL.


Method Summary
 boolean accept(java.lang.String token)
          Part of the SQL is passed into this method.
 java.lang.String getNativeToken()
          If this mapping handled a token with accept(String) was called, then this will return the replacement token.
 

Method Detail

accept

boolean accept(java.lang.String token)
Part of the SQL is passed into this method. If it to be converted, then this method should return true.

Parameters:
token - The SQL token that is been checked
Returns:
True if handled by the mapping, otherwise false.

getNativeToken

java.lang.String getNativeToken()
If this mapping handled a token with accept(String) was called, then this will return the replacement token.

Returns:
The replacement token