Set the properties in the superclass.

@param _instance Instance of this EventDefinition
@throws EFapsException on error
556889
private void setProperties(final Instance _instance)
        throws EFapsException
    {
        final QueryBuilder queryBldr = new QueryBuilder(CIAdminCommon.Property);
        queryBldr.addWhereAttrEqValue(CIAdminCommon.Property.Abstract, _instance.getId());
        final MultiPrintQuery multi = queryBldr.getPrint();
        multi.addAttribute(CIAdminCommon.Property.Name, CIAdminCommon.Property.Value);
        multi.executeWithoutAccessCheck();
        while (multi.next()) {
            super.setProperty(multi.<String>getAttribute(CIAdminCommon.Property.Name),
                            multi.<String>getAttribute(CIAdminCommon.Property.Value));
        }
    }
152962
private void evalAccess()
        throws EFapsException
    {
        final List<Instance> instances = new ArrayList<>();
        while (step(this.selection.getInstSelects().values())) {
            for (final Entry<String, Select> entry : this.selection.getInstSelects().entrySet()) {
                final Object object = entry.getValue().getCurrent();
                if (object != null) {
                    if (object instanceof List) {
                        ((List<?>) object).stream()
                            .filter(Objects::nonNull)
                            .forEach(e -> instances.add((Instance) e));
                    } else {
                        instances.add((Instance) object);
                    }
                }
            }
        }
        for (final Entry<String, Select> entry : this.selection.getInstSelects().entrySet()) {
            entry.getValue().reset();
        }
        this.access = Access.get(AccessTypeEnums.READ.getAccessType(), instances);
    }
263797
public function setInstance(string $class, $instance, string $selector = Injector::DEFAULT_SELECTOR)
    {
        if (!is_a($instance, $class))
            throw new DIException("Instance should be a subclass of $class");

        if (!isset($this->objects[$class]))
            $this->objects[$class] = [];

        $this->objects[$class][$selector] = $instance;
    }
104459
private void addCreateUpdateAttributes() throws EFapsException
    {
        final Iterator<?> iter = getType().getAttributes().entrySet().iterator();
        while (iter.hasNext()) {
            final Map.Entry<?, ?> entry = (Map.Entry<?, ?>) iter.next();
            final Attribute attr = (Attribute) entry.getValue();
            final AttributeType attrType = attr.getAttributeType();
            if (attrType.isCreateUpdate()) {
                addInternal(attr, false, (Object) null);
            }
            if (attr.getDefaultValue() != null) {
                addInternal(attr, false, attr.getDefaultValue());
            }
        }
    }
1255435
public void setInstances(java.util.Collection<DeviceInstance> instances) {
        if (instances == null) {
            this.instances = null;
            return;
        }

        this.instances = new java.util.ArrayList<DeviceInstance>(instances);
    }
903340
protected static function setCachedInstance(MessagePartFactory $instance)
    {
        if (self::$instances === null) {
            self::$instances = [];
        }
        $class = get_called_class();
        self::$instances[$class] = $instance;
    }
866671
void updateInstance(T instance) {
        T oldInstance = this.instance.getAndSet(Preconditions.checkNotNull(instance, "instance"));
        if (oldInstance != null && oldInstance != instance) {
            oldInstance.close();
        }
    }
979823
public static void index(final IndexContext _context,
                             final List<Instance> _instances)
        throws EFapsException
    {
        if (CollectionUtils.isNotEmpty(_instances)) {
            final Company currentCompany = Context.getThreadContext().getCompany();
            final String currentLanguage = Context.getThreadContext().getLanguage();

            Context.getThreadContext().setCompany(Company.get(_context.getCompanyId()));
            Context.getThreadContext().setLanguage(_context.getLanguage());
            final IndexWriterConfig config = new IndexWriterConfig(_context.getAnalyzer());
            try (
                    IndexWriter writer = new IndexWriter(_context.getDirectory(), config);
                    TaxonomyWriter taxonomyWriter = new DirectoryTaxonomyWriter(_context.getTaxonomyDirectory());
                ) {

                final IndexDefinition def = IndexDefinition.get(_instances.get(0).getType().getUUID());
                final MultiPrintQuery multi = new MultiPrintQuery(_instances);
                for (final IndexField field : def.getFields()) {
                    multi.addSelect(field.getSelect());
                }
                Attribute createdAttr = null;
                if (!_instances.get(0).getType().getAttributes(CreatedType.class).isEmpty()) {
                    createdAttr = _instances.get(0).getType().getAttributes(CreatedType.class).iterator().next();
                    multi.addAttribute(createdAttr);
                }
                multi.addMsgPhrase(def.getMsgPhrase());
                multi.executeWithoutAccessCheck();
                while (multi.next()) {
                    final String oid = multi.getCurrentInstance().getOid();
                    final String type = multi.getCurrentInstance().getType().getLabel();
                    final DateTime created;
                    if (createdAttr == null) {
                        created = new DateTime();
                    } else {
                        created = multi.getAttribute(createdAttr);
                    }

                    final Document doc = new Document();
                    doc.add(new FacetField(Dimension.DIMTYPE.name(), type));
                    doc.add(new FacetField(Dimension.DIMCREATED.name(), String.valueOf(created.getYear()),
                                    String.format("%02d", created.getMonthOfYear())));
                    doc.add(new StringField(Key.OID.name(), oid, Store.YES));
                    doc.add(new TextField(DBProperties.getProperty("index.Type"), type, Store.YES));
                    doc.add(new NumericDocValuesField(Key.CREATED.name(), created.getMillis()));
                    doc.add(new StringField(Key.CREATEDSTR.name(),
                                    DateTools.dateToString(created.toDate(), DateTools.Resolution.DAY), Store.NO));

                    final StringBuilder allBldr = new StringBuilder()
                                    .append(type).append(" ");

                    for (final IndexField field : def.getFields()) {
                        final String name = DBProperties.getProperty(field.getKey());
                        Object value = multi.getSelect(field.getSelect());
                        if (value != null) {
                            if (StringUtils.isNoneEmpty(field.getTransform())) {
                                final Class<?> clazz = Class.forName(field.getTransform(),
                                                false, EFapsClassLoader.getInstance());
                                final ITransformer transformer = (ITransformer) clazz.newInstance();
                                value = transformer.transform(value);
                            }
                            switch (field.getFieldType()) {
                                case LONG:
                                    long val = 0;
                                    if (value instanceof String) {
                                        val = NumberUtils.toLong((String) value);
                                    } else if (value instanceof Number) {
                                        val = ((Number) value).longValue();
                                    }
                                    doc.add(new LongField(name, val, Store.YES));
                                    allBldr.append(value).append(" ");
                                    break;
                                case SEARCHLONG:
                                    long val2 = 0;
                                    if (value instanceof String) {
                                        val2 = NumberUtils.toLong((String) value);
                                    } else if (value instanceof Number) {
                                        val2 = ((Number) value).longValue();
                                    }
                                    doc.add(new LongField(name, val2, Store.NO));
                                    allBldr.append(value).append(" ");
                                    break;
                                case STRING:
                                    doc.add(new StringField(name, String.valueOf(value), Store.YES));
                                    allBldr.append(value).append(" ");
                                    break;
                                case SEARCHSTRING:
                                    doc.add(new StringField(name, String.valueOf(value), Store.NO));
                                    allBldr.append(value).append(" ");
                                    break;
                                case TEXT:
                                    doc.add(new TextField(name, String.valueOf(value), Store.YES));
                                    allBldr.append(value).append(" ");
                                    break;
                                case SEARCHTEXT:
                                    doc.add(new TextField(name, String.valueOf(value), Store.NO));
                                    allBldr.append(value).append(" ");
                                    break;
                                case STORED:
                                    doc.add(new StoredField(name, String.valueOf(value)));
                                    allBldr.append(value).append(" ");
                                    break;
                                default:
                                    break;
                            }
                        }
                    }
                    doc.add(new StoredField(Key.MSGPHRASE.name(), multi.getMsgPhrase(def.getMsgPhrase())));
                    doc.add(new TextField(Key.ALL.name(), allBldr.toString(), Store.NO));
                    writer.updateDocument(new Term(Key.OID.name(), oid),
                                    Index.getFacetsConfig().build(taxonomyWriter, doc));
                    LOG.debug("Add Document: {}", doc);
                }
                writer.close();
                taxonomyWriter.close();
            } catch (final IOException | ClassNotFoundException | InstantiationException | IllegalAccessException e) {
                throw new EFapsException(Indexer.class, "IOException", e);
            } finally {
                Context.getThreadContext().setCompany(currentCompany);
                Context.getThreadContext().setLanguage(currentLanguage);
            }
        }
    }
701281
public EntityInstanceWrapper buildInstanceWrapper(final Object instance) throws PMException {
        final EntityInstanceWrapper wrapper = new EntityInstanceWrapper(instance);
        if (hasEntity() && !getEntityContainer().isSelectedNew()) {
            wrapper.setInstanceId(getDataAccess().getInstanceId(this, wrapper));
        }
        return wrapper;
    }
87898
public static void setInstance(Application application) {
		if (application == Application.instance) {
			return;
		}
		if (Application.instance != null) {
			throw new IllegalStateException("Application cannot be changed");
		}		
		if (application == null) {
			throw new IllegalArgumentException("Application cannot be null");
		}
		Application.instance = application;
	}
16136
public void setInstanceSnapshots(java.util.Collection<InstanceSnapshot> instanceSnapshots) {
        if (instanceSnapshots == null) {
            this.instanceSnapshots = null;
            return;
        }

        this.instanceSnapshots = new java.util.ArrayList<InstanceSnapshot>(instanceSnapshots);
    }
857910
public void setInstancesList(java.util.Collection<String> instancesList) {
        if (instancesList == null) {
            this.instancesList = null;
            return;
        }

        this.instancesList = new com.amazonaws.internal.SdkInternalList<String>(instancesList);
    }
950455
public Insert set(final CIAttribute _attr, final Object _value)
        throws EFapsException
    {
        return super.set(_attr.name, Converter.convert(_value));
    }
1033398
@Override
    public void executeWithoutTrigger()
        throws EFapsException
    {
        final Context context = Context.getThreadContext();
        ConnectionResource con = null;
        try {

            con = context.getConnectionResource();

            final SQLTable mainTable = getType().getMainTable();

            final long id = executeOneStatement(con, mainTable, getTable2values().get(mainTable), 0);

            setInstance(Instance.get(getInstance().getType(), id));

            getInstance().setExchangeId(this.exchangeId);
            getInstance().setExchangeSystemId(this.exchangeSystemId);

            GeneralInstance.insert(getInstance(), con);

            for (final Entry<SQLTable, List<Value>> entry :  getTable2values().entrySet()) {
                final SQLTable table = entry.getKey();
                if (!table.equals(mainTable) && !table.isReadOnly()) {
                    executeOneStatement(con, table, entry.getValue(), id);
                }
            }
            Queue.registerUpdate(getInstance());
        } finally {

        }
    }
830634
public void setInstances(java.util.Collection<InstanceSummary> instances) {
        if (instances == null) {
            this.instances = null;
            return;
        }

        this.instances = new java.util.ArrayList<InstanceSummary>(instances);
    }
1227931
@Override
    public void activate(final T instance, final Object key) throws DempsyException {
        wrap(() -> activationMethod.invoke(instance, key));
    }
842136
public static PermissionSet getPermissionSet(final Instance _instance)
        throws EFapsException
    {
        Evaluation.LOG.debug("Evaluation PermissionSet for {}", _instance);
        final Key accessKey = Key.get4Instance(_instance);
        final PermissionSet ret = AccessCache.getPermissionCache().get(accessKey);
        Evaluation.LOG.debug("Evaluated PermissionSet {}", ret);
        return ret;
    }