- horoscope-api: Swiss Ephemeris natal charts, timezone/place resolution, POST /v1/natal and POST /v1/synastry - backend: users with roles, email/password and Google login, saved charts, synastries and invites, analyses with credit ledger, public shares, admin - shared crates: astro-engine, db (migrations), horoscope-client, service-kit - docker-compose with postgres, legacy Java project for reference Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
29 lines
1.0 KiB
Java
Executable File
29 lines
1.0 KiB
Java
Executable File
package astrochart.server.service;
|
|
|
|
import java.util.logging.Logger;
|
|
import javax.jdo.JDOHelper;
|
|
import javax.jdo.PersistenceManager;
|
|
import javax.jdo.PersistenceManagerFactory;
|
|
import astrochart.client.service.AdminService;
|
|
import astrochart.shared.data.Epoch;
|
|
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
|
|
|
@SuppressWarnings("serial")
|
|
public class AdminServiceImpl extends RemoteServiceServlet implements AdminService {
|
|
@SuppressWarnings("unused")
|
|
private static final Logger LOG = Logger.getLogger(AdminServiceImpl.class.getName());
|
|
private static final PersistenceManagerFactory PMF = JDOHelper.getPersistenceManagerFactory("transactions-optional");
|
|
|
|
@Override
|
|
public final void saveEpoch(final Epoch epoch) {
|
|
System.out.println(epoch);
|
|
final PersistenceManager pm = PMF.getPersistenceManager();
|
|
try {
|
|
pm.makePersistent(epoch);
|
|
// LOG.log(Level.INFO, "Epoch stored: " + epoch);
|
|
} finally {
|
|
pm.close();
|
|
}
|
|
}
|
|
}
|