001 package org.cumulus4j.store.reflectionwrapper.gae; 002 003 import org.cumulus4j.store.reflectionwrapper.ReflectionWrapper; 004 import org.cumulus4j.store.reflectionwrapper.ReflectionWrapperException; 005 006 public class Key extends ReflectionWrapper { 007 008 protected Key(KeyFactory keyFactory, Object wrappedObject) { 009 super(keyFactory, wrappedObject); 010 } 011 012 public long getId() { 013 Object result = invoke(1, "getId"); 014 015 if (!(result instanceof Long)) 016 throw new ReflectionWrapperException("getId() did not return an instance of Long, but: " + result); 017 018 return (Long) result; 019 } 020 021 }