2009-01-22 22:38:10 +03:00
|
|
|
<?php
|
2009-02-04 19:35:36 +03:00
|
|
|
/*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
* This software consists of voluntary contributions made by many individuals
|
|
|
|
* and is licensed under the LGPL. For more information, see
|
|
|
|
* <http://www.doctrine-project.org>.
|
2009-01-22 22:38:10 +03:00
|
|
|
*/
|
|
|
|
|
2009-07-15 14:59:35 +04:00
|
|
|
namespace Doctrine\ORM\Mapping;
|
|
|
|
|
2009-08-21 22:13:22 +04:00
|
|
|
use Doctrine\Common\Annotations\Annotation;
|
2009-07-30 19:16:02 +04:00
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
/* Annotations */
|
|
|
|
|
2009-08-17 21:58:16 +04:00
|
|
|
final class Entity extends Annotation {
|
2009-01-22 22:38:10 +03:00
|
|
|
public $repositoryClass;
|
|
|
|
}
|
2009-07-30 19:16:02 +04:00
|
|
|
final class MappedSuperclass extends Annotation {}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class InheritanceType extends Annotation {}
|
|
|
|
final class DiscriminatorColumn extends Annotation {
|
2009-01-22 22:38:10 +03:00
|
|
|
public $name;
|
2009-07-21 13:25:14 +04:00
|
|
|
public $fieldName; // field name used in non-object hydration (array/scalar)
|
2009-01-22 22:38:10 +03:00
|
|
|
public $type;
|
|
|
|
public $length;
|
|
|
|
}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class DiscriminatorMap extends Annotation {}
|
|
|
|
/*final class SubClasses extends Annotation {}*/
|
|
|
|
final class Id extends Annotation {}
|
|
|
|
final class GeneratedValue extends Annotation {
|
2010-02-09 20:13:49 +03:00
|
|
|
public $strategy = 'AUTO';
|
2009-03-30 23:43:05 +04:00
|
|
|
}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class Version extends Annotation {}
|
|
|
|
final class JoinColumn extends Annotation {
|
2009-01-22 22:38:10 +03:00
|
|
|
public $name;
|
2009-07-21 13:25:14 +04:00
|
|
|
public $fieldName; // field name used in non-object hydration (array/scalar)
|
2010-02-09 20:13:49 +03:00
|
|
|
public $referencedColumnName = 'id';
|
2009-02-04 19:35:36 +03:00
|
|
|
public $unique = false;
|
|
|
|
public $nullable = true;
|
2009-01-22 22:38:10 +03:00
|
|
|
public $onDelete;
|
|
|
|
public $onUpdate;
|
2010-02-02 00:48:27 +03:00
|
|
|
public $columnDefinition;
|
2009-01-22 22:38:10 +03:00
|
|
|
}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class JoinColumns extends Annotation {}
|
|
|
|
final class Column extends Annotation {
|
2010-02-09 20:13:49 +03:00
|
|
|
public $type = 'string';
|
2009-01-22 22:38:10 +03:00
|
|
|
public $length;
|
2010-02-09 20:13:49 +03:00
|
|
|
// The precision for a decimal (exact numeric) column (Applies only for decimal column)
|
|
|
|
public $precision = 0;
|
|
|
|
// The scale for a decimal (exact numeric) column (Applies only for decimal column)
|
|
|
|
public $scale = 0;
|
2009-02-02 14:55:50 +03:00
|
|
|
public $unique = false;
|
|
|
|
public $nullable = false;
|
2009-05-29 14:23:13 +04:00
|
|
|
public $name;
|
2009-09-04 22:35:40 +04:00
|
|
|
public $options = array();
|
2010-01-21 01:35:18 +03:00
|
|
|
public $columnDefinition;
|
2009-01-22 22:38:10 +03:00
|
|
|
}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class OneToOne extends Annotation {
|
2009-01-22 22:38:10 +03:00
|
|
|
public $targetEntity;
|
|
|
|
public $mappedBy;
|
|
|
|
public $cascade;
|
2009-10-12 16:54:14 +04:00
|
|
|
public $fetch = 'LAZY';
|
2009-05-11 14:43:27 +04:00
|
|
|
public $optional;
|
2009-07-23 13:52:16 +04:00
|
|
|
public $orphanRemoval = false;
|
2009-01-22 22:38:10 +03:00
|
|
|
}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class OneToMany extends Annotation {
|
2009-01-22 22:38:10 +03:00
|
|
|
public $mappedBy;
|
|
|
|
public $targetEntity;
|
|
|
|
public $cascade;
|
2009-10-12 16:54:14 +04:00
|
|
|
public $fetch = 'LAZY';
|
2009-07-23 13:52:16 +04:00
|
|
|
public $orphanRemoval = false;
|
2009-01-22 22:38:10 +03:00
|
|
|
}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class ManyToOne extends Annotation {
|
2009-01-22 22:38:10 +03:00
|
|
|
public $targetEntity;
|
|
|
|
public $cascade;
|
2009-10-12 16:54:14 +04:00
|
|
|
public $fetch = 'LAZY';
|
2009-05-11 14:43:27 +04:00
|
|
|
public $optional;
|
2009-01-22 22:38:10 +03:00
|
|
|
}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class ManyToMany extends Annotation {
|
2009-01-22 22:38:10 +03:00
|
|
|
public $targetEntity;
|
|
|
|
public $mappedBy;
|
|
|
|
public $cascade;
|
2009-10-12 16:54:14 +04:00
|
|
|
public $fetch = 'LAZY';
|
2009-01-22 22:38:10 +03:00
|
|
|
}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class ElementCollection extends Annotation {
|
2009-02-04 19:35:36 +03:00
|
|
|
public $tableName;
|
|
|
|
}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class Table extends Annotation {
|
2009-02-04 19:35:36 +03:00
|
|
|
public $name;
|
|
|
|
public $schema;
|
2009-08-21 22:13:22 +04:00
|
|
|
public $indexes;
|
|
|
|
public $uniqueConstraints;
|
|
|
|
}
|
|
|
|
final class UniqueConstraint extends Annotation {
|
|
|
|
public $name;
|
|
|
|
public $columns;
|
|
|
|
}
|
|
|
|
final class Index extends Annotation {
|
|
|
|
public $name;
|
|
|
|
public $columns;
|
2009-02-04 19:35:36 +03:00
|
|
|
}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class JoinTable extends Annotation {
|
2009-02-04 19:35:36 +03:00
|
|
|
public $name;
|
|
|
|
public $schema;
|
|
|
|
public $joinColumns;
|
|
|
|
public $inverseJoinColumns;
|
2009-03-14 12:05:52 +03:00
|
|
|
}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class SequenceGenerator extends Annotation {
|
2009-03-30 23:43:05 +04:00
|
|
|
public $sequenceName;
|
2009-05-29 14:23:13 +04:00
|
|
|
public $allocationSize = 10;
|
2009-03-30 23:43:05 +04:00
|
|
|
public $initialValue = 1;
|
2009-03-14 12:05:52 +03:00
|
|
|
}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class ChangeTrackingPolicy extends Annotation {}
|
2009-07-18 15:41:37 +04:00
|
|
|
|
2010-02-14 22:38:22 +03:00
|
|
|
final class OrderBy extends Annotation {}
|
|
|
|
|
2009-07-18 15:41:37 +04:00
|
|
|
/* Annotations for lifecycle callbacks */
|
2009-08-26 21:14:03 +04:00
|
|
|
final class HasLifecycleCallbacks extends Annotation {}
|
2009-08-17 21:58:16 +04:00
|
|
|
final class PrePersist extends Annotation {}
|
|
|
|
final class PostPersist extends Annotation {}
|
|
|
|
final class PreUpdate extends Annotation {}
|
|
|
|
final class PostUpdate extends Annotation {}
|
|
|
|
final class PreRemove extends Annotation {}
|
|
|
|
final class PostRemove extends Annotation {}
|
|
|
|
final class PostLoad extends Annotation {}
|
2009-07-18 15:41:37 +04:00
|
|
|
|