Retrieve the default mapping between MPXJ assignment fields and Primavera assignment field names.

@return mapping
18707
public static Map<FieldType, String> getDefaultAssignmentFieldMap()
   {
      Map<FieldType, String> map = new LinkedHashMap<FieldType, String>();

      map.put(AssignmentField.UNIQUE_ID, "taskrsrc_id");
      map.put(AssignmentField.GUID, "guid");
      map.put(AssignmentField.REMAINING_WORK, "remain_qty");
      map.put(AssignmentField.BASELINE_WORK, "target_qty");
      map.put(AssignmentField.ACTUAL_OVERTIME_WORK, "act_ot_qty");
      map.put(AssignmentField.BASELINE_COST, "target_cost");
      map.put(AssignmentField.ACTUAL_OVERTIME_COST, "act_ot_cost");
      map.put(AssignmentField.REMAINING_COST, "remain_cost");
      map.put(AssignmentField.ACTUAL_START, "act_start_date");
      map.put(AssignmentField.ACTUAL_FINISH, "act_end_date");
      map.put(AssignmentField.BASELINE_START, "target_start_date");
      map.put(AssignmentField.BASELINE_FINISH, "target_end_date");
      map.put(AssignmentField.ASSIGNMENT_DELAY, "target_lag_drtn_hr_cnt");

      return map;
   }
1310969
protected Map<String, List<Object>> getReleasedByDefaultAttributes(final Principal p, final Map<String, List<Object>> attributes) {
        val ctx = ApplicationContextProvider.getApplicationContext();
        if (ctx != null) {
            LOGGER.trace("Located application context. Retrieving default attributes for release, if any");
            val props = ctx.getAutowireCapableBeanFactory().getBean(CasConfigurationProperties.class);
            val defaultAttrs = props.getAuthn().getAttributeRepository().getDefaultAttributesToRelease();
            LOGGER.debug("Default attributes for release are: [{}]", defaultAttrs);
            val defaultAttributesToRelease = new TreeMap<String, List<Object>>(String.CASE_INSENSITIVE_ORDER);
            defaultAttrs.forEach(key -> {
                if (attributes.containsKey(key)) {
                    LOGGER.debug("Found and added default attribute for release: [{}]", key);
                    defaultAttributesToRelease.put(key, attributes.get(key));
                }
            });
            return defaultAttributesToRelease;
        }
        return new TreeMap<>();
    }
867688
private List<UDFAssignmentType> writeUDFType(FieldTypeClass type, FieldContainer mpxj)
   {
      List<UDFAssignmentType> out = new ArrayList<UDFAssignmentType>();
      for (CustomField cf : m_sortedCustomFieldsList)
      {
         FieldType fieldType = cf.getFieldType();
         if (fieldType != null && type == fieldType.getFieldTypeClass())
         {
            Object value = mpxj.getCachedValue(fieldType);
            if (FieldTypeHelper.valueIsNotDefault(fieldType, value))
            {
               UDFAssignmentType udf = m_factory.createUDFAssignmentType();
               udf.setTypeObjectId(FieldTypeHelper.getFieldID(fieldType));
               setUserFieldValue(udf, fieldType.getDataType(), value);
               out.add(udf);
            }
         }
      }
      return out;
   }
999868
public static MappingRules getDefaultMappingRules() {
        return new MappingRules(MAPPING_NODE_FILTER, MAPPING_EXPORT_FILTER, MAPPING_IMPORT_FILTER,
                new PropertyFormat(PropertyFormat.Scope.value, PropertyFormat.Binary.base64),
                0, MappingRules.ChangeRule.update);
    }
1088612
private function getReferenceMapping() : array
    {
        $this->requiresCurrentField();
        assert($this->currentField !== null);

        try {
            return $this->class->getFieldMapping($this->currentField);
        } catch (MappingException $e) {
            if (empty($this->class->discriminatorMap)) {
                throw $e;
            }
            $mapping = null;
            $foundIn = null;
            foreach ($this->class->discriminatorMap as $child) {
                $childClass = $this->dm->getClassMetadata($child);
                if (! $childClass->hasAssociation($this->currentField)) {
                    continue;
                }

                if ($foundIn !== null && $mapping !== null && $mapping !== $childClass->getFieldMapping($this->currentField)) {
                    throw MappingException::referenceFieldConflict($this->currentField, $foundIn->name, $childClass->name);
                }
                $mapping = $childClass->getFieldMapping($this->currentField);
                $foundIn = $childClass;
            }
            if ($mapping === null) {
                throw MappingException::mappingNotFoundInClassNorDescendants($this->class->name, $this->currentField);
            }

            return $mapping;
        }
    }
502558
public static Map<String, String> getXpathVariables(Map<String, Collection<AttributeBean>> attributeMap) {
        // Set all the bind variables in the query context

        Map<String, String> variables = new HashMap<String, String>();

        for (String t : targets) {
            int count = 0;
            for (AttributeBean bean : attributeMap.get(t.toLowerCase()
                                                       + "Attributes")) {
                if (bean.getId().equals(XACML_RESOURCE_ID)) {
                    variables.put("XacmlResourceId", bean.getId());

                    if (log.isDebugEnabled()) {
                        log.debug("XacmlResourceId = '" + bean.getId()
                                  + "'");
                    }


                    int c = 0;
                    for (String value : bean.getValues()) {
                        variables.put("XacmlResourceIdValue"
                                          + c, value);
                        if (log.isDebugEnabled()) {
                            log.debug("XacmlResourceIdValue"
                                      + c + " = '" + value + "'");
                        }


                        c++;
                    }
                } else {
                    variables.put(t + "Id" + count,
                                             bean.getId());

                    if (log.isDebugEnabled()) {
                        log.debug(t + "Id" + count + " = '" + bean.getId()
                                  + "'");
                    }

                    int valueCount = 0;
                    for (String value : bean.getValues()) {
                        variables.put(t + "Id" + count
                                                 + "-Value"
                                                 + valueCount,
                                                 value);
                        if (log.isDebugEnabled()) {
                            log.debug(t + "Id" + count + "-Value"
                                      + valueCount + " = '" + value + "'");
                        }

                        valueCount++;
                    }

                    count++;
                }
            }
        }
        return variables;


    }
1063242
protected static function getDefaultNormalizersMap()
    {
        return array(
            self::FIELD_UNIQUE_ID       =>   self::FIELD_UNIQUE_ID,
            self::FIELD_USERNAME        =>   self::FIELD_USERNAME,
            self::FIELD_FIRST_NAME      =>   self::FIELD_FIRST_NAME,
            self::FIELD_LAST_NAME       =>   self::FIELD_LAST_NAME,
            self::FIELD_FULL_NAME       =>   self::FIELD_FULL_NAME,
            self::FIELD_EMAIL           =>   self::FIELD_EMAIL,
            self::FIELD_DESCRIPTION     =>   self::FIELD_DESCRIPTION,
            self::FIELD_LOCATION        =>   self::FIELD_LOCATION,
            self::FIELD_PROFILE_URL     =>   self::FIELD_PROFILE_URL,
            self::FIELD_IMAGE_URL       =>   self::FIELD_IMAGE_URL,
            self::FIELD_WEBSITES        =>   self::FIELD_WEBSITES,
            self::FIELD_VERIFIED_EMAIL  =>   self::FIELD_VERIFIED_EMAIL,
            self::FIELD_EXTRA           =>   self::FIELD_EXTRA,
        );
    }
509674
public function getCMSFields()
    {
        $fields = $this->scaffoldFormFields(
            array(
                // Don't allow has_many/many_many relationship editing before the record is first saved
                'includeRelations' => ($this->ID > 0),
                'tabbed' => true,
                'ajaxSafe' => true
            )
        );
        $fields->removeByName(
            array(
                'Title',
                'Instance',
                'Style',
                'Objects'
            )
        );
        if (!$this->IsMain) {
            $fields->addFieldsToTab(
                'Root.Main',
                array(
                    TextField::create(
                        'Title',
                        _t('PlaceableObject_Preset.TITLE', 'Title')
                    ),
                    DropdownField::create(
                        'Instance',
                        _t('PlaceableObject_Preset.INSTANCE', 'Instance'),
                        singleton('PlaceableObject_Preset')->dbObject('Instance')->enumValues()
                    )
                )
            );
        }
        if ($this->Styles) {
            $fields->addFieldToTab(
                'Root.Main',
                DropdownField::create(
                    'Style',
                    _t('PlaceableObject_Preset.STYLE', 'Style'),
                    $this->Styles
                )->setEmptyString(_t('PlaceableObject_Preset.DEFAULTSTYLE', 'Default'))
            );
        }
        $fields->addFieldsToTab(
            'Root.Objects',
            array(
                LabelField::create(
                    'ObjectsDescription',
                    _t('PlaceableObject_Preset.OBJECTSDESCRIPTION', 'List of all objects that use this use this preset.')
                ),
                GridField::create(
                    'Objects',
                    _t('PlaceableObject_Preset.OBJECTS', 'Objects'),
                    $this->Objects(),
                    GridFieldConfig_Base::create()
                )
            )
        );
        $this->extend('updateCMSFields', $fields);
        return $fields;
    }
504743
@SuppressWarnings("unchecked") public Map<String, Object> getCustomProperties()
   {
      return (Map<String, Object>) getCachedValue(ProjectField.CUSTOM_PROPERTIES);
   }
692161
protected function getDefaultsReplace()
    {
        if ( ! config('pxlcms.generator.models.include_defaults')) return '';

        $attributes = $this->data['defaults'] ?: [];

        if ( ! count($attributes)) return '';

        // align assignment signs by longest attribute
        $longestLength = 0;

        foreach ($attributes as $attribute => $default) {

            if (strlen($attribute) > $longestLength) {
                $longestLength = strlen($attribute);
            }
        }

        $replace = $this->tab() . "protected \$attributes = [\n";

        foreach ($attributes as $attribute => $default) {

            $replace .= $this->tab(2)
                . "'" . str_pad($attribute . "'", $longestLength + 1)
                . " => " . $default . ",\n";
        }

        $replace .= $this->tab() . "];\n\n";

        return $replace;
    }
940736
public static synchronized Map<String, List<QuickFixContribution>> getContributedQuickFixes() {
        if (contributedQuickFixes != null) {
            return contributedQuickFixes;
        }
        HashMap<String, List<QuickFixContribution>> set = new HashMap<>();

        IExtensionRegistry registry = Platform.getExtensionRegistry();
        for (IConfigurationElement configElt : registry.getConfigurationElementsFor(EXTENSION_POINT_ID)) {
            addContribution(set, configElt);
        }
        Set<Entry<String, List<QuickFixContribution>>> entrySet = set.entrySet();
        for (Entry<String, List<QuickFixContribution>> entry : entrySet) {
            entry.setValue(Collections.unmodifiableList(entry.getValue()));
        }
        contributedQuickFixes = Collections.unmodifiableMap(set);
        return contributedQuickFixes;
    }
1021202
protected static function getDefaultFields()
    {
        //
        $attribute = 'DefaultFields';

        // retrieve value from class setting definition
        if (!static::hasClassAttribute($attribute)) {
            $fields = [];

            //
            $schema = static::getSchema();

            //
            foreach ($schema as $field => $aspects) {
                if (isset($aspects['Class']) && $aspects['Relation'] == '1:1') {
                    $class = $aspects['Class'];
                    $fields[$field] = call_user_func($class.'::join', $field);
                } else {
                    $fields[] = $field;
                }
            }

            // store as setting for future request
            static::setClassAttribute($attribute, $fields);
        }

        // return primary key field name
        return static::getClassAttribute($attribute);
    }
1300629
public function getCMSFields()
    {
        $fields = parent::getCMSFields();
        $fields->addFieldsToTab(
            'Root.Main',
            array(
                DropdownField::create(
                    'ClassName',
                    _t('Placeable.TYPE', 'Type'),
                    singleton('RegionObject_Preset')->SubClassNames
                )->setEmptyString(_t('Placeable.NONE', 'None'))
            )
        );

        $fields->removeByName('PageTypes');
        $fields->addFieldsToTab(
            'Root.PageTypes',
            array(
                LabelField::create(
                    'PageTypesDescription',
                    _t('RegionObject_Preset.PAGETYPESDESCRIPTION', 'List of all page types that use this use this preset.')
                ),
                GridField::create(
                    'PageTypes',
                    _t('RegionObject_Preset.PAGETYPES', 'Page Types'),
                    $this->Objects(),
                    GridFieldConfig_Base::create()
                )
            )
        );

        $this->extend('updateCMSFields', $fields);
        return $fields;
    }
206621
public function getColumnObjectsMapping()
    {
        $mapping = array();
        $localTable = $this->getTable();
        $foreignTable = $this->getForeignTable();
        for ($i = 0, $size = count($this->localColumns); $i < $size; $i++) {
            $mapping[]= array(
                'local'   => $localTable->getColumn($this->localColumns[$i]),
                'foreign' => $foreignTable->getColumn($this->foreignColumns[$i]),
            );
        }

        return $mapping;
    }
476772
private Field getPartitionKeyField()
    {
        Field[] embeddedFields = entityMetadata.getIdAttribute().getBindableJavaType().getDeclaredFields();

        Field field = null;
        for (Field embeddedField : embeddedFields)
        {
            if (!ReflectUtils.isTransientOrStatic(embeddedField))
            {
                field = embeddedField;
                break;
            }
        }
        return field;
    }
1041060
private ObjectMapper getObjectMapper() {
		ObjectMapper mapper = new ObjectMapper();
		AnnotationIntrospector primary = new JacksonAnnotationIntrospector();
		AnnotationIntrospector secondary = new JaxbAnnotationIntrospector();
		AnnotationIntrospector pair = new AnnotationIntrospectorPair(primary, secondary);

		mapper.setAnnotationIntrospector(pair);
		mapper.setSerializationInclusion(Include.NON_NULL);

		return mapper;
	}
1082898
public static ObjectMapper getDefaultObjectMapper() {

        ObjectMapper mapper = new ObjectMapper();

        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        mapper.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL, true);

        mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
        mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);

        return mapper;
    }