3 # FILE: ControlledNameFactory.php
5 # Part of the Collection Workflow Integration System (CWIS)
6 # Copyright 2011-2013 Edward Almasy and Internet Scout Research Group
7 # http://scout.wisc.edu/cwis/
15 # ---- PUBLIC INTERFACE --------------------------------------------------
23 # save field ID for our later use
24 $this->FieldId = $FieldId;
26 # set up item factory base class
27 $this->
ItemFactory(
"ControlledName",
"ControlledNames",
28 "ControlledNameId",
"ControlledName", FALSE,
29 ($FieldId ?
"FieldId = ".intval($FieldId) : NULL));
39 return $this->DB->Query(
40 "SELECT COUNT(DISTINCT RNI.ResourceId) AS ResourceCount"
41 .
" FROM ResourceNameInts RNI, ControlledNames CN"
42 .
" WHERE CN.FieldId = ".intval($this->FieldId)
43 .
" AND RNI.ControlledNameId = CN.ControlledNameId"
44 .
" AND RNI.ResourceId >= 0",
49 # ---- PRIVATE INTERFACE -------------------------------------------------
__construct($FieldId=NULL)
Constructor for ControlledNameFactory class.
Factory for manipulating ControlledName objects.
GetUsageCount()
Determine how many resources have controlled names (associated with this metadata field) assigned to ...
Common factory class for item manipulation.
ItemFactory($ItemClassName, $ItemTableName, $ItemIdFieldName, $ItemNameFieldName=NULL, $OrderOpsAllowed=FALSE, $SqlCondition=NULL)
Class constructor.