4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
10 +--------------------------------------------------------------------+
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
22 namespace Civi\Api4\Generic
;
25 * Base class for DAO-based entities.
27 abstract class DAOEntity
extends AbstractEntity
{
30 * @return DAOGetAction
32 public static function get() {
33 return new DAOGetAction(static::class, __FUNCTION__
);
37 * @return DAOGetAction
39 public static function save() {
40 return new DAOSaveAction(static::class, __FUNCTION__
);
44 * @return DAOGetFieldsAction
46 public static function getFields() {
47 return new DAOGetFieldsAction(static::class, __FUNCTION__
);
51 * @return DAOCreateAction
53 public static function create() {
54 return new DAOCreateAction(static::class, __FUNCTION__
);
58 * @return DAOUpdateAction
60 public static function update() {
61 return new DAOUpdateAction(static::class, __FUNCTION__
);
65 * @return DAODeleteAction
67 public static function delete() {
68 return new DAODeleteAction(static::class, __FUNCTION__
);
72 * @return BasicReplaceAction
74 public static function replace() {
75 return new BasicReplaceAction(static::class, __FUNCTION__
);