实体类 复制
@param pSource 源实体类
@param pTtarget 目标实体类
@param <T>
4300
public static <T> void copy(T pSource, T pTtarget) {
        Method[] vMethods = pSource.getClass().getMethods();
        for (int i = 0; i < vMethods.length; i++) {
            if (vMethods[i].getDeclaringClass().equals(Object.class)) {
                continue;
            }
            if (vMethods[i].getName().startsWith("get")) {
                String vMethodName = "set" + vMethods[i].getName().substring(3);
                try {
                    Method vMethod = pTtarget.getClass().getMethod(vMethodName, vMethods[i].getReturnType());
                    if (null == vMethod) {
                        continue;
                    }
                    Object vValue = vMethods[i].invoke(pSource);
                    if (null != vValue) {
                        vMethod.invoke(pTtarget, vValue);
                    }
                } catch (Exception e) {
                    LogHelper.error("", "复制对象错误", "ModelHelper.copy", e);
                }
            }
        }
    }
573080
function (templateCtxt, tplSource) {

            ariaUtilsJson.setValue(this._data, "locked", true);

            if (tplSource) {
                tplSource = this._data.selectedTemplate.tplSrcEdit;
            }

            // do some cleaning
            this.clearHightlight();

            // do not close if target IS the contextual menu
            if (this._mainContextual && templateCtxt.tplClasspath != this._mainContextual.CONTEXTUAL_TEMPLATE_CLASSPATH) {
                this._mainContextual.close();
            }

            // replace in this scope Aria and aria
            var oSelf = this;
            var doIt = function () {
                // var Aria = oSelf.bridge.getAria(), aria = oSelf.bridge.getAriaPackage();

                // ... and call for reload
                templateCtxt.$reload(tplSource, {
                    fn : oSelf._unlock,
                    scope : oSelf
                });
            };
            doIt();

        }
822359
function (tplSource, callback) {

            var tmpCfg = this._getReloadCfg();
            if (tplSource) {
                aria.templates.TemplateManager.$onOnce({
                    "unloadTemplate" : {
                        fn : function () {
                            var logicalPath = tmpCfg.classpath.replace(/\./g, "/") + ".tpl";
                            var cacheContent = ariaCoreCache.getItem("files", logicalPath, true);
                            cacheContent.status = 3; // status OK
                            cacheContent.value = tplSource;
                        },
                        scope : this
                    }
                });
            }

            tmpCfg.reload = true;
            tmpCfg.reloadByPassCache = true;

            var disposed = Aria.disposeTemplate(tmpCfg.div); // dispose the old template
            if (!disposed) {
                this.$logError("Could not reload template: " + tmpCfg.classpath);
            } else {
                this._callLoadTemplate(tmpCfg, callback);
            }
        }
187910
@Override
    public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) {
        synchronized (this) {
            if (sourceTargetUtility == null) {
                sourceTargetUtility = new SourceTargetUtility(new Transform<String,String>() {
                    @Override
                    public String transform(String source) {
                        return UCharacter.toUpperCase(locale, source);
                    }
                });
            }
        }
        sourceTargetUtility.addSourceTargetSet(this, inputFilter, sourceSet, targetSet);
    }
86015
public final void initLineSource(String lineSource)
    {
        if (lineSource == null) throw new IllegalArgumentException();
        if (this.lineSource != null) throw new IllegalStateException();
        this.lineSource = lineSource;
    }
471158
public void setTargetBytecode(String version) {
        if (CompilerConfiguration.PRE_JDK5.equals(version) || CompilerConfiguration.POST_JDK5.equals(version)) {
            this.targetBytecode = version;
        }
    }
5151
public void execute(final CCTask task, final List<File> sources, final Map<String, TargetInfo> targets,
      final TargetInfo linkTarget) {
    try {
      this.projectWriter.writeProject(this.outFile, task, this, sources, targets, linkTarget);
    } catch (final BuildException ex) {
      if (this.failOnError) {
        throw ex;
      } else {
        task.log(ex.toString());
      }
    } catch (final Exception ex) {
      if (this.failOnError) {
        throw new BuildException(ex);
      } else {
        task.log(ex.toString());
      }
    }
  }
276007
public boolean exists(final String pTileSource, final long pMapTileIndex) {
        return 1 == getRowCount(primaryKey, getPrimaryKeyParameters(getIndex(pMapTileIndex), pTileSource));
    }
1240567
@Override
  public String toSource() {
    return runInCompilerThread(
        () -> {
          Tracer tracer = newTracer("toSource");
          try {
            CodeBuilder cb = new CodeBuilder();
            if (jsRoot != null) {
              int i = 0;
              if (options.shouldPrintExterns()) {
                for (Node scriptNode = externsRoot.getFirstChild();
                    scriptNode != null;
                    scriptNode = scriptNode.getNext()) {
                  toSource(cb, i++, scriptNode);
                }
              }
              for (Node scriptNode = jsRoot.getFirstChild();
                  scriptNode != null;
                  scriptNode = scriptNode.getNext()) {
                toSource(cb, i++, scriptNode);
              }
            }
            return cb.toString();
          } finally {
            stopTracer(tracer, "toSource");
          }
        });
  }
966322
@Override
    public void setTarget(String target) {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            SibTr.debug(this, TRACE, "setTarget", target);
        }
        _target = target;

    }
1167989
@Override
    public void setTargetType(String newTargetType) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setTargetType", newTargetType);

        // Check for null and empty string, and set to default value if found
        if ((newTargetType == null) || ("".equals(newTargetType))) {
            jcaManagedConnectionFactory.setTargetType(ApiJmsConstants.TARGET_TYPE_BUSMEMBER);
        }
        // Ensure that the value is one of the permitted constants - thrown an exception if not
        else if ((ApiJmsConstants.TARGET_TYPE_BUSMEMBER.equals(newTargetType))
                 || (ApiJmsConstants.TARGET_TYPE_CUSTOM.equals(newTargetType))
                 || (ApiJmsConstants.TARGET_TYPE_ME.equals(newTargetType))) {
            jcaManagedConnectionFactory.setTargetType(newTargetType);
        }
        else {
            throw (JMSException) JmsErrorUtils.newThrowable(
                                                            JMSException.class,
                                                            "INVALID_VALUE_CWSIA0261",
                                                            new Object[] { "remoteTargetType", newTargetType },
                                                            tc
                            );
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setTargetType");
    }
763425
private void scanUserPaths(PackageSymbol p, boolean includeSourcePath) throws IOException {
        Set<JavaFileObject.Kind> kinds = getPackageFileKinds();

        Set<JavaFileObject.Kind> classKinds = EnumSet.copyOf(kinds);
        classKinds.remove(JavaFileObject.Kind.SOURCE);
        boolean wantClassFiles = !classKinds.isEmpty();

        Set<JavaFileObject.Kind> sourceKinds = EnumSet.copyOf(kinds);
        sourceKinds.remove(JavaFileObject.Kind.CLASS);
        boolean wantSourceFiles = !sourceKinds.isEmpty();

        boolean haveSourcePath = includeSourcePath && fileManager.hasLocation(SOURCE_PATH);

        if (verbose && verbosePath) {
            if (fileManager instanceof StandardJavaFileManager) {
                StandardJavaFileManager fm = (StandardJavaFileManager)fileManager;
                if (haveSourcePath && wantSourceFiles) {
                    List<Path> path = List.nil();
                    for (Path sourcePath : fm.getLocationAsPaths(SOURCE_PATH)) {
                        path = path.prepend(sourcePath);
                    }
                    log.printVerbose("sourcepath", path.reverse().toString());
                } else if (wantSourceFiles) {
                    List<Path> path = List.nil();
                    for (Path classPath : fm.getLocationAsPaths(CLASS_PATH)) {
                        path = path.prepend(classPath);
                    }
                    log.printVerbose("sourcepath", path.reverse().toString());
                }
                if (wantClassFiles) {
                    List<Path> path = List.nil();
                    for (Path platformPath : fm.getLocationAsPaths(PLATFORM_CLASS_PATH)) {
                        path = path.prepend(platformPath);
                    }
                    for (Path classPath : fm.getLocationAsPaths(CLASS_PATH)) {
                        path = path.prepend(classPath);
                    }
                    log.printVerbose("classpath",  path.reverse().toString());
                }
            }
        }

        String packageName = p.fullname.toString();
        if (wantSourceFiles && !haveSourcePath) {
            fillIn(p, CLASS_PATH,
                   list(CLASS_PATH,
                        p,
                        packageName,
                        kinds));
        } else {
            if (wantClassFiles)
                fillIn(p, CLASS_PATH,
                       list(CLASS_PATH,
                            p,
                            packageName,
                            classKinds));
            if (wantSourceFiles)
                fillIn(p, SOURCE_PATH,
                       list(SOURCE_PATH,
                            p,
                            packageName,
                            sourceKinds));
        }
    }
1014631
public final void mSOURCE() throws RecognitionException {
        try {
            int _type = SOURCE;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:120:7: ( ( 'S' | 's' ) ( 'O' | 'o' ) ( 'U' | 'u' ) ( 'R' | 'r' ) ( 'C' | 'c' ) ( 'E' | 'e' ) )
            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:120:9: ( 'S' | 's' ) ( 'O' | 'o' ) ( 'U' | 'u' ) ( 'R' | 'r' ) ( 'C' | 'c' ) ( 'E' | 'e' )
            {
            if ( input.LA(1)=='S'||input.LA(1)=='s' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( input.LA(1)=='O'||input.LA(1)=='o' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( input.LA(1)=='U'||input.LA(1)=='u' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( input.LA(1)=='R'||input.LA(1)=='r' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( input.LA(1)=='C'||input.LA(1)=='c' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( input.LA(1)=='E'||input.LA(1)=='e' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
1301627
@SuppressWarnings("unchecked")
    public void updateTarget(final Target updatedTarget) {
        if (updatedTarget != null) {
            final Item item = getItem(updatedTarget.getId());
            // TO DO update SPUILabelDefinitions.ASSIGNED_DISTRIBUTION_NAME_VER
            // &
            // SPUILabelDefinitions.ASSIGNED_DISTRIBUTION_NAME_VER

            /*
             * Update the status which will trigger the value change lister
             * registered for the target update status. That listener will
             * update the new status icon showing for this target in the table.
             */
            item.getItemProperty(SPUILabelDefinitions.VAR_TARGET_STATUS).setValue(updatedTarget.getUpdateStatus());
            /*
             * Update the last query which will trigger the value change lister
             * registered for the target last query column. That listener will
             * update the latest query date for this target in the tooltip.
             */
            item.getItemProperty(SPUILabelDefinitions.LAST_QUERY_DATE).setValue(updatedTarget.getLastTargetQuery());

            item.getItemProperty(SPUILabelDefinitions.VAR_LAST_MODIFIED_BY)
                    .setValue(UserDetailsFormatter.loadAndFormatLastModifiedBy(updatedTarget));
            item.getItemProperty(SPUILabelDefinitions.VAR_LAST_MODIFIED_DATE)
                    .setValue(SPDateTimeUtil.getFormattedDate(updatedTarget.getLastModifiedAt()));
            item.getItemProperty(SPUILabelDefinitions.VAR_DESC).setValue(updatedTarget.getDescription());

            /* Update the new Name, Description and poll date */
            item.getItemProperty(SPUILabelDefinitions.VAR_NAME).setValue(updatedTarget.getName());
        }
    }
343674
@Override
    public OutputHandler choosePtoPOutputHandler(SIBUuid8 fixedMEUuid,
                                                 SIBUuid8 preferredMEUuid,
                                                 boolean localMessage,
                                                 boolean forcePut,
                                                 HashSet<SIBUuid8> scopedMEs)
                    throws
                    SIRollbackException,
                    SIConnectionLostException,
                    SIResourceException,
                    SIErrorException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "choosePtoPOutputHandler", new Object[] { fixedMEUuid,
                                                                     preferredMEUuid,
                                                                     localMessage,
                                                                     forcePut,
                                                                     scopedMEs });

        OutputHandler result = null;
        boolean error = false;

        // We're an alias so we should never be called with a scoped ME set
        if (scopedMEs != null)
        {
            SIMPErrorException e = new SIMPErrorException("Alias called with scoped ME set");

            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            {
                SibTr.exception(tc, e);
            }

            e.setExceptionReason(SIRCConstants.SIRC0901_INTERNAL_MESSAGING_ERROR);
            e.setExceptionInserts(new String[] { "com.ibm.ws.sib.processor.impl.ProducerSessionImpl.handleMessage",
                                                "1:750:1.71.2.6",
                                                SIMPUtils.getStackTrace(e) });
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(tc, "choosePtoPOutputHandlers", e);
            throw e;
        }

        // Pull out any scoped ME set that we have configured
        SIBUuid8 singleScopedME = null;
        HashSet<SIBUuid8> definedScopedMEs = null;

        // If this is an alias that's scoped the message points of the target destination
        // then we need to pass these onto the target.
        if (_hasScopedMessagePoints)
        {

            if (_singleScopedQueuePointME != null)
                singleScopedME = _singleScopedQueuePointME;
            else
                definedScopedMEs = _scopedQueuePointMEs;

            // If the caller has fixed an ME, first check it's in our set
            if (fixedMEUuid != null)
            {
                if ((singleScopedME != null) && !fixedMEUuid.equals(singleScopedME))
                    error = true;
                else if ((definedScopedMEs != null) && !definedScopedMEs.contains(fixedMEUuid))
                    error = true;
            }

            // If we have a single ME scoped by this alias we may as pass it to the target as
            // a fixed ME (which it must match as we've already checked that) to save
            // having to parse a HashSet everywhere for no need.
            if (singleScopedME != null)
                fixedMEUuid = singleScopedME;
        }

        // Look to the resolved destination to choose an output handler as the
        // alias destination doesnt store any messages
        if (!error)
            result = _targetDestinationHandler.choosePtoPOutputHandler(fixedMEUuid,
                                                                       preferredMEUuid,
                                                                       localMessage,
                                                                       forcePut,
                                                                       definedScopedMEs);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "choosePtoPOutputHandler", result);

        return result;
    }
978899
public void setPage(String key, PageSource ps) {
	ps.setLastAccessTime();

	pageSources.put(key.toLowerCase(), ps);
    }
859064
public void setSelection(final String pSelection)
    {
        if (pSelection != null && pSelection.length() > 0) {
            selection = Pattern.compile(pSelection);
        }
    }