18 declare(strict_types=1);
36 public function __construct(
int $a_server_id = 0,
int $mapping_type = 0,
string $ecs_field =
'')
40 $this->db = $DIC->database();
52 $this->server_id = $a_server_id;
99 $this->advmd_id = $a_id;
107 $query =
'SELECT * FROM ecs_data_mapping ' .
108 'WHERE sid = ' . $this->db->quote($this->
getServerId(),
'integer') .
' ' .
109 'AND mapping_type = ' . $this->db->quote($this->
getMappingType(),
'integer') .
' ' .
110 'AND ecs_field = ' . $this->db->quote($this->
getECSField(),
'text');
112 if (
$res->numRows()) {
124 $query =
'UPDATE ecs_data_mapping ' .
125 'SET advmd_id = ' . $this->db->quote($this->
getAdvMDId(),
'integer') .
' ' .
126 'WHERE sid = ' . $this->db->quote($this->
getServerId(),
'integer') .
' ' .
127 'AND mapping_type = ' . $this->db->quote($this->
getMappingType(),
'integer') .
' ' .
128 'AND ecs_field = ' . $this->db->quote($this->
getECSField(),
'text');
129 $this->db->manipulate(
$query);
134 $query =
'INSERT INTO ecs_data_mapping (sid,mapping_type,ecs_field,advmd_id) ' .
136 $this->db->quote($this->
getServerId(),
'integer') .
', ' .
138 $this->db->quote($this->
getECSField(),
'text') .
', ' .
139 $this->db->quote($this->
getAdvMDId(),
'integer') .
' ) ';
140 $this->db->manipulate(
$query);
151 $query =
'SELECT * FROM ecs_data_mapping ' .
152 'WHERE sid = ' . $this->db->quote($this->
getServerId(),
'integer') .
' ' .
153 'AND mapping_type = ' . $this->db->quote($this->
getMappingType(),
'integer') .
' ' .
154 'AND ecs_field = ' . $this->db->quote($this->
getECSField(),
'text');
const MAPPING_IMPORT_RCRS
getMappingType()
Get mapping type.
getServerId()
Get server id.
setECSField(string $ecs_field)
getECSField()
Get ecs field.
__construct(int $a_server_id=0, int $mapping_type=0, string $ecs_field='')
setServerId(int $a_server_id)
set server id
setMappingType(int $mapping_type)
Set mapping type.