private ChessHogConstants() {
throw new AssertionError(
- "No org.hedgecode.chess.ChessHogConstants instances!"
+ String.format("No %s instances!", getClass().getName())
);
}
private EtudeConstants() {
throw new AssertionError(
- "No org.hedgecode.chess.EtudeConstants instances!"
+ String.format("No %s instances!", getClass().getName())
);
}
private EtudeUtils() {
throw new AssertionError(
- "No org.hedgecode.chess.EtudeUtils instances!"
+ String.format("No %s instances!", getClass().getName())
);
}
public final class PersistenceUtils {
public static EntityManagerFactory createEntityManagerFactory() {
- return Persistence.createEntityManagerFactory(
+ return createEntityManagerFactory(
EtudeConstants.PERSISTENCE_UNIT_NAME
);
}
+ public static EntityManagerFactory createEntityManagerFactory(String persistenceUnitName) {
+ return Persistence.createEntityManagerFactory(
+ persistenceUnitName
+ );
+ }
+
private PersistenceUtils() {
throw new AssertionError(
- "No org.hedgecode.chess.persistence.PersistenceUtils instances!"
+ String.format("No %s instances!", getClass().getName())
);
}
private FilenameUtils() {
throw new AssertionError(
- "No org.hedgecode.chess.img.FilenameUtils instances!"
+ String.format("No %s instances!", getClass().getName())
);
}
private ImageConstants() {
throw new AssertionError(
- "No ImageConstants instances!"
+ String.format("No %s instances!", getClass().getName())
);
}
private ChessQRCodeConstants() {
throw new AssertionError(
- "No org.hedgecode.chess.qrcode.ChessQRCodeConstants instances!"
+ String.format("No %s instances!", getClass().getName())
);
}
private ZipContentUtils() {
throw new AssertionError(
- "No org.hedgecode.chess.qrcode.zip.ZipContentUtils instances!"
+ String.format("No %s instances!", getClass().getName())
);
}
private UCIConstants() {
throw new AssertionError(
- "No UCIConstants instances!"
+ String.format("No %s instances!", getClass().getName())
);
}