Show
Ignore:
Timestamp:
10/23/08 19:37:46 (23 months ago)
Author:
mikey
Message:

implement enhancement #180: persistence API should support date instances

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • framework/trunk/src/test/php/net/stubbles/rdbms/persistence/MockSinglePrimaryKeyEntity.php

    r1763 r1896  
    66 * @subpackage  rdbms_persistence_test 
    77 */ 
     8stubClassLoader::load('net::stubbles::lang::types::stubDate'); 
    89/** 
    910 * This is a mocked entity that has some annotations. 
     
    3435     */ 
    3536    protected $id; 
     37    /** 
     38     * a date instance 
     39     * 
     40     * @var  stubDate 
     41     */ 
     42    protected $date; 
    3643 
    3744    /** 
     
    101108        return $this->defaultValue; 
    102109    } 
     110 
     111    /** 
     112     * sets the date instance 
     113     * 
     114     * @param  stubDate  $date 
     115     */ 
     116    public function setDate(stubDate $date) 
     117    { 
     118        $this->date = $date; 
     119    } 
     120 
     121    /** 
     122     * method that returns a date instance 
     123     * 
     124     * @return  stubDate 
     125     * @DBColumn(name='date', type='DATETIME', setterMethod='setDate') 
     126     */ 
     127    public function withDate() 
     128    { 
     129        return $this->date; 
     130    } 
    103131} 
    104132?>