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

com.dooapp.gaedo.blueprints.AbstractLazyLoader Maven / Gradle / Ivy

There is a newer version: 1.0.16
Show newest version
package com.dooapp.gaedo.blueprints;

import java.io.ObjectStreamException;
import java.util.Map;

import com.dooapp.gaedo.blueprints.strategies.GraphMappingStrategy;
import com.dooapp.gaedo.finders.repository.ServiceRepository;
import com.dooapp.gaedo.properties.Property;
import com.tinkerpop.blueprints.Vertex;

public abstract class AbstractLazyLoader {

	protected transient Property property;
	protected transient Vertex rootVertex;
	protected transient ServiceRepository repository;
	protected boolean loaded = false;
	protected ClassLoader classLoader;
	protected ObjectCache objectsBeingAccessed;
	/**
	 * Edge name is eagerly determined from known elements to fasten lazy loading (and avoid some service unavailability issues
	 */
	protected String edgeName;
	protected GraphDatabaseDriver driver;
	protected transient GraphMappingStrategy strategy;

	public AbstractLazyLoader() {

	}

	public AbstractLazyLoader(GraphDatabaseDriver driver, GraphMappingStrategy strategy, Property property, Vertex rootVertex, ServiceRepository repository,
					ClassLoader classLoader, ObjectCache objectsBeingAccessed) {
		super();
		this.driver = driver;
		this.strategy = strategy;
		this.property = property;
		this.rootVertex = rootVertex;
		this.repository = repository;
		this.classLoader = classLoader;
		this.objectsBeingAccessed = objectsBeingAccessed;
	}

	private Object writeReplace() throws ObjectStreamException {
		throw new UnsupportedOperationException("that's the proxy that should call writeReplace !");
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy