id = pixelsId;
if ( id == null || id.longValue() != pixelsId ) { id = new Long( pixelsId ); pixelsInstance = null; buffer = null;  IPixels metadataService = serviceFactory.getPixelsService(); PixelsService dataService = (PixelsService) applicationContext.getBean("/OME/OMEIS/Pixels"); pixelsInstance = metadataService.retrievePixDescription( id ); try { buffer = dataService.createPixelBuffer( pixelsInstance ); } catch (IOException e) { e.printStackTrace();  throw new ResourceError( "Failed to create PixelBuffer:\n" +e.getMessage()); } }
    public void setPixelsId(long pixelsId)    {        id = pixelsId;    }