
package com.exedio.cope.lib;

import java.util.Arrays;
import java.util.List;

public final class MediaAttribute extends Attribute
{
	StringColumn mimeMajor;
	StringColumn mimeMinor;

	public MediaAttribute(final Item.Option option)
	{
		super(option);
	}
	
	protected List createColumns(final String name, final boolean notNull)
	{
		mimeMajor = new StringColumn(getType(), name + "Major", notNull);
		mimeMinor = new StringColumn(getType(), name + "Minor", notNull);
		return Arrays.asList(new StringColumn[]{mimeMajor, mimeMinor});
	}
	
	Object cacheToSurface(final Object cache)
	{
		return cache;
	}
		
	Object surfaceToCache(final Object surface)
	{
		return surface;
	}
	
}

@@ -327,16 +327,79 @@
 ull)%0A%09%7B%0A
+%09%09// TODO: create column only, if major mime type is not fixed%0A
 %09%09mimeMa
@@ -458,16 +458,79 @@
 tNull);%0A
+%09%09// TODO: create column only, if minor mime type is not fixed%0A
 %09%09mimeMi

add TODO