Examples of Persistent


Examples of org.apache.torque.om.Persistent

     *
     * @return the object primaryKey as an Object
     */
    public ObjectKey getPrimaryKey()
    {
        Persistent p = getPersistentObj();
        if (p != null)
        {
            return p.getPrimaryKey();
        }
        else
        {
            return null;
        }
View Full Code Here

Examples of org.apache.torque.om.Persistent

     *
     */

    public static Persistent newPersistentInstance()
    {
        Persistent obj = null;

        if(groupObject == null)
        {
            // This can happen if the Turbine wants to determine the
            // name of the anonymous user before the security service
View Full Code Here

Examples of org.apache.torque.om.Persistent

     *         rethrown wrapped into a TorqueException.
     */
    protected Persistent getOMInstance(ObjectKey key, boolean fromCache)
        throws TorqueException
    {
        Persistent om = null;
        if (fromCache)
        {
            om = cacheGet(key);
        }

View Full Code Here

Examples of org.apache.torque.om.Persistent

        return om;
    }

    protected Persistent cacheGet(Serializable key)
    {
        Persistent om = null;
        if (cache != null)
        {
            synchronized (this)
            {
                om = (Persistent) cache.get(key);
View Full Code Here

Examples of org.apache.torque.om.Persistent

     *         rethrown wrapped into a TorqueException.
     */
    protected Persistent removeInstanceImpl(Serializable key)
        throws TorqueException
    {
        Persistent oldOm = null;
        if (cache != null)
        {
            try
            {
                synchronized (this)
View Full Code Here

Examples of org.apache.torque.om.Persistent

            throw new TorqueException(om + "; class=" + om.getClass().getName()
                + "; id=" + om.getPrimaryKey() + " cannot be cached with "
                + getOMClass().getName() + " objects");
        }

        Persistent oldOm = null;
        if (cache != null)
        {
            try
            {
                synchronized (this)
View Full Code Here

Examples of org.apache.torque.om.Persistent

            oms = new ArrayList(ids);
            List newIds = new ArrayList(ids.size());
            for (int i = 0; i < ids.size(); i++)
            {
                ObjectKey key = (ObjectKey) ids.get(i);
                Persistent om = null;
                if (fromCache)
                {
                    om = cacheGet(key);
                }
                if (om == null)
                {
                    newIds.add(key);
                }
                else
                {
                    oms.set(i, om);
                }
            }

            if (newIds.size() > 0)
            {
                List newOms = retrieveStoredOMs(newIds);
                for (int i = 0; i < oms.size(); i++)
                {
                    if (oms.get(i) instanceof ObjectKey)
                    {
                        for (int j = newOms.size() - 1; j >= 0; j--)
                        {
                            Persistent om = (Persistent) newOms.get(j);
                            if (om.getPrimaryKey().equals(oms.get(i)))
                            {
                                // replace the id with the om and add the om
                                // to the cache
                                oms.set(i, om);
                                newOms.remove(j);
View Full Code Here

Examples of org.cometd.bayeux.server.ConfigurableServerChannel.Initializer.Persistent

        // Test publish triggered by a message sent by the client
        // There will be a response pending so the case is different
        publishLatch.set(new CountDownLatch(1));
        connectLatch.set(new CountDownLatch(1));
        String serviceChannelName = "/service/test";
        final ServerChannel serviceChannel = bayeux.createChannelIfAbsent(serviceChannelName, new Persistent()).getReference();
        serviceChannel.addListener(new ServerChannel.MessageListener()
        {
            public boolean onMessage(ServerSession from, ServerChannel channel, ServerMessage.Mutable message)
            {
                bayeux.getChannel(channelName).publish(emitter, data);
View Full Code Here

Examples of org.insightech.er.editor.persistent.Persistent

  public Map<String,ERTable> findAllTable(Project project){
    Map<String,ERTable> map = Maps.newLinkedHashMap();
    if(Collections3.isEmpty(project.getErmPathList())){
      return map;
    }
    Persistent persistent = Persistent.getInstance();
    InputStream in = null;
    for(String ermPath:project.getErmPathList()) {
      File file = new File(FileUtils.getAbsolutePath(ermPath));
      try {
        in =new BufferedInputStream(new FileInputStream(file));
        ERDiagram diagram = persistent.load(in);
        List<ERTable> erTableList = diagram.getDiagramContents().getContents().getTableSet().getList();
        for(ERTable erTable:erTableList) {
          map.put(erTable.getPhysicalName(), erTable);
        }
      } catch (FileNotFoundException e) {
View Full Code Here

Examples of org.openntf.domino.xots.annotations.Persistent

  public void loaderCallback(final LoaderRunnable runner) {
    NSFComponentModule referenceMod = runner.getModule();

    Set<Class<?>> classes = runner.getClasses();
    for (Class<?> clazz : classes) {
      Persistent persistent = clazz.getAnnotation(Persistent.class);
      Persistent.Context ctx = persistent.appContext();
      Persistent.Scope scope = persistent.scope();
      // TODO de-dupe based on replica ID to handle faux text ".nsf" redirection files
      if (scope == Persistent.Scope.APPLICATION) {
        if (ctx == Persistent.Context.XSPFORCED) {
          try {
            NSFComponentModule forcedMod = getNsfService().loadModule(referenceMod.getDatabasePath());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.