Inserting into custom SQL types with prepared statements in java
Have you tried to cast column to enum?
// Setup stuff up here.
sql = "INSERT INTO foo (suit) VALUES (?::card_suit)";
st.setString(1, 'spades');
st.executeUpdate(sql);
Explained in Convert between Java enums and PostgreSQL enums article of 'A web coding blog' with samples:
INSERT INTO pet (pet_id, pet_type, name)
VALUES (?, CAST(? AS animal_type), ?);
--or
INSERT INTO pet (pet_id, pet_type, name)
VALUES (?, ?::animal_type, ?);