All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.alantea.writekeeper.data.ElementId Maven / Gradle / Ivy

The newest version!
package net.alantea.writekeeper.data;

import java.io.Serializable;

import net.alantea.glide.GException;
import net.alantea.glideui.bdd.Bdd;

public class ElementId implements Serializable
{
   private static final long serialVersionUID = 1L;
   
   private long id;
   
   public ElementId(Element element)
   {
      this.id = element.getIndex();
   }

   public Element getElement()
   {
      try
      {
         return (Element) Bdd.getGlider().getEntity(id);
      }
      catch (GException e)
      {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
      return null;
   }
   
   public String toString()
   {
      return getElement().getName();
   }
   
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy