propel-map
[ class tree: propel-map ] [ index: propel-map ] [ all elements ]

Class: ColumnMap

Source Location: /map/ColumnMap.php

Class Overview


ColumnMap is used to model a column of a table in a database.


Author(s):

Version:

  • $Revision: 784 $

Methods



Class Details

[line 44]
ColumnMap is used to model a column of a table in a database.

GENERAL NOTE ------------ The propel.map classes are abstract building-block classes for modeling the database at runtime. These classes are similar (a lite version) to the propel.engine.database.model classes, which are build-time modeling classes. These classes in themselves do not do any database metadata lookups, but instead are used by the MapBuilder classes that were generated for your datamodel. The MapBuilder that was created for your datamodel build a representation of your database by creating instances of the DatabaseMap, TableMap, ColumnMap, etc. classes. See propel/templates/om/php5/MapBuilder.tpl and the classes generated by that template for your datamodel to further understand how these are put together.




Tags:

author:  John D. McNally <jmcnally@collab.net> (Torque)
author:  Hans Lellelid <hans@xmpl.org> (Propel)
version:  $Revision: 784 $


[ Top ]


Class Methods


constructor __construct [line 85]

ColumnMap __construct( string $name, TableMap $containingTable)

Constructor.



Tags:

access:  public


Parameters:

string   $name   The name of the column.
TableMap   $containingTable   containingTable TableMap of the table this column is in.

[ Top ]

method addValidator [line 315]

void addValidator( $validator)



Tags:

access:  public


Parameters:

   $validator  

[ Top ]

method getColumnName [line 96]

string getColumnName( )

Gets column name (DEPRECATED).



Tags:

deprecated:  Use getName() instead.
access:  public


[ Top ]

method getDefaultValue [line 292]

mixed getDefaultValue( )

Gets the default value for this column.



Tags:

return:  String or NULL
access:  public


[ Top ]

method getFullyQualifiedName [line 137]

string getFullyQualifiedName( )

Get the table name + column name.



Tags:

return:  A String with the full column name.
access:  public


[ Top ]

method getName [line 106]

string getName( )

Get the name of a column.



Tags:

return:  A String with the column name.
access:  public


[ Top ]

method getPdoType [line 198]

int getPdoType( )

Get the PDO type of this column.



Tags:

return:  The PDO::PARMA_* value
access:  public


[ Top ]

method getPhpName [line 116]

string getPhpName( )

Get the name of a column.



Tags:

return:  A String with the column name.
access:  public


[ Top ]

method getRelatedColumnName [line 399]

string getRelatedColumnName( )

Get the column name that this column is related to.



Tags:

return:  A String with the name for the related column.
access:  public


[ Top ]

method getRelatedName [line 379]

string getRelatedName( )

Get the table.column that this column is related to.



Tags:

return:  A String with the full name for the related column.
access:  public


[ Top ]

method getRelatedTableName [line 389]

string getRelatedTableName( )

Get the table name that this column is related to.



Tags:

return:  A String with the name for the related table.
access:  public


[ Top ]

method getSize [line 335]

int getSize( )

Get the size of this column.



Tags:

return:  An int specifying the size.
access:  public


[ Top ]

method getTable [line 146]

TableMap getTable( )

Get the table map this column belongs to.



Tags:

access:  public


[ Top ]

method getTableName [line 156]

string getTableName( )

Get the name of the table this column is in.



Tags:

return:  A String with the table name.
access:  public


[ Top ]

method getType [line 166]

string getType( )

Get the Propel type of this column.



Tags:

return:  A string representing the Propel type (e.g. PropelColumnTypes::DATE).
access:  public


[ Top ]

method getValidators [line 325]

void getValidators( )



Tags:

access:  public


[ Top ]

method hasValidators [line 320]

void hasValidators( )



Tags:

access:  public


[ Top ]

method ignoreCase [line 409]

void ignoreCase( string $str, $db)

Performs DB-specific ignore case, but only if the column type necessitates it.



Tags:

access:  public


Parameters:

string   $str   The expression we want to apply the ignore case formatting to (e.g. the column name).
DBAdapter   $db  

[ Top ]

method isEpochTemporal [line 221]

boolean isEpochTemporal( )

Whether this is a DATE/TIME/TIMESTAMP column that is post-epoch (1970).

PHP cannot handle pre-epoch timestamps well -- hence the need to differentiate between epoch and pre-epoch timestamps.




Tags:

deprecated:  Propel supports non-epoch dates
access:  public


[ Top ]

method isForeignKey [line 365]

boolean isForeignKey( )

Is this column a foreign key?



Tags:

return:  True if column is a foreign key.
access:  public


[ Top ]

method isLob [line 207]

boolean isLob( )

Whether this is a BLOB, LONGVARBINARY, or VARBINARY.



Tags:

access:  public


[ Top ]

method isNotNull [line 355]

boolean isNotNull( )

Is null value allowed ?



Tags:

return:  True if column may not be null.
access:  public


[ Top ]

method isNumeric [line 230]

boolean isNumeric( )

Whether this column is numeric (int, decimal, bigint etc).



Tags:

access:  public


[ Top ]

method isPrimaryKey [line 345]

boolean isPrimaryKey( )

Is this column a primary key?



Tags:

return:  True if column is a primary key.
access:  public


[ Top ]

method isTemporal [line 241]

boolean isTemporal( )

Whether this is a DATE/TIME/TIMESTAMP column.



Tags:

since:  1.3
access:  public


[ Top ]

method isText [line 250]

boolean isText( )

Whether this column is a text column (varchar, char, longvarchar).



Tags:

access:  public


[ Top ]

method setForeignKey [line 304]

void setForeignKey( string $tableName, string $columnName)

Set the foreign key for this column.



Tags:

access:  public


Parameters:

string   $tableName   tableName The name of the table that is foreign.
string   $columnName   columnName The name of the column that is foreign.

[ Top ]

method setNotNull [line 283]

void setNotNull( boolean $nn)

Set if this column may be null.



Tags:

access:  public


Parameters:

boolean   $nn   nn True if column may be null.

[ Top ]

method setPhpName [line 127]

void setPhpName( string $phpName)

Set the php anme of this column.



Tags:

access:  public


Parameters:

string   $phpName   A string representing the PHP name.

[ Top ]

method setPrimaryKey [line 272]

void setPrimaryKey( boolean $pk)

Set if this column is a primary key or not.



Tags:

access:  public


Parameters:

boolean   $pk   True if column is a primary key.

[ Top ]

method setSize [line 261]

void setSize( int $size)

Set the size of this column.



Tags:

access:  public


Parameters:

int   $size   An int specifying the size.

[ Top ]

method setType [line 177]

void setType( string $type)

Set the Propel type of this column.



Tags:

access:  public


Parameters:

string   $type   A string representing the Propel type (e.g. PropelColumnTypes::DATE).

[ Top ]


Documentation generated on Thu, 22 Nov 2007 03:33:28 +0000 by phpDocumentor 1.4.0